I want it so my script can spawn meteors on top of him when he presses on Z, a beam of light will be on the location of his/her mouse when X is pressed, and a beam of fire will be lauched out of his torso wjhen C is pressed. However this doesnt work!
--[[ Script by Mr_Unlucky Hello, to those who found this script, please dont remove the credits, and please dont leak. CONTROLS; [Z]; Brimstone Barrage [X]; Soul Strike [C]; Blaze Beam --]] --//=================================\\ --|| -=CONTROLS=- || --\\=================================// print("Script by Mr_Unlucky") print("Hello, to those who found this script, please dont remove the credits.") print("CONTROLS;") print("[Z]; Brimstone Barrage") print("[X]; Soul Strike") print("[C]; Blaze Beam") print("CREDITS") print("SezHu - For the hat weld script. It wasn't copied and pasted, It was actually typed manually.") print("Mr_Unlucky(me) - Scripted this.") print("ID: https://pastebin.com/ZUctR96q") --//=================================\\ --|| -=VARIABLES=- || --\\=================================// --//MISCELLANEOUS\\-- Attacking = false -- These were implemented as a safety precaution so no one just uses all the moves at once. BrimstoneBarrage = false SoulStrike = false BlazeBeam = false Running = false Hostile = false CurrentTitle = "Demonic Entity" --//PLAYER\\-- local Players = game:GetService("Players") local LocalPlayer = Players.LocalPlayer local Character = LocalPlayer.Character local Humanoid = Character["Humanoid"] local RightArm = Character["Right Arm"] local LeftArm = Character["Left Arm"] local RightLeg = Character["Right Leg"] local LeftLeg = Character["Left Leg"] local Torso = Character["Torso"] local Head = Character["Head"] local RootPart = Character["HumanoidRootPart"] local Mouse = LocalPlayer:GetMouse() local UIS = game:GetService("UserInputService") --//=================================\\ --|| -=PLAYER CUSTOMIZATION=- || --\\=================================// --//AVATAR\\-- Humanoid.MaxHealth = math.huge wait(0.1) Humanoid.Health = Humanoid.MaxHealth Humanoid.WalkSpeed = 110 Humanoid.JumpPower = 90 Character.Shirt:Destroy() Character.Pants:Destroy() local newShirt = Instance.new("Shirt",Character) local newPants = Instance.new("Pants",Character) newShirt.Name = "Shirt" newPants.Name = "Pants" newShirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1013516988" newPants.PantsTemplate = "http://www.roblox.com/asset/?id=1035284728" Head.face.Texture = "http://www.roblox.com/asset/?id=470245396" for i,v in pairs (Character:GetChildren()) do if v.ClassName == "Accessory" then v:Destroy() end end --[[ HatHandle = Instance.new("Part") HatMesh = Instance.new("SpecialMesh") HatWeld = Instance.new("Weld") HatHandle.Parent = Character HatHandle.Name = "Handle" HatHandle.CanCollide = false HatHandle.Locked = true HatHandle.Size = Vector3.new(1.93, 1.77, 1.6) HatMesh.Parent = HatHandle HatWeld.Part0 = Head HatWeld.Part1 = HatHandle HatWeld.C0 = CFrame.new(0,.4,0) * CFrame.fromEulerAnglesXYZ(math.rad(-1),0,0)VertexColor = Vector3.new(1,1,1) HatHandle.Transparency = 0 HatMesh.Scale = Vector3.new(1,1,1) HatMesh.MeshId = "http://www.roblox.com/asset/?id=62246019" HatMesh.TextureId = "http://www.roblox.com/asset/?id=62246077" --]] HatHandle = Instance.new("Part") HatMesh = Instance.new("SpecialMesh") HatWeld = Instance.new("Weld") HatHandle.Parent = Character HatHandle.Name = "Handle" HatHandle.CanCollide = false HatHandle.Locked = true HatHandle.Size = Vector3.new(1.93, 1.77, 1.6) HatMesh.Parent = HatHandle HatMesh.Scale = HatMesh.Scale HatWeld.Parent = HatHandle HatWeld.Name = "no" HatWeld.Part0 = Head HatWeld.Part1 = HatHandle HatWeld.C0 = CFrame.new(0,.4,0.2) * CFrame.fromEulerAnglesXYZ(math.rad(-1),0,0)VertexColor = Vector3.new(1,1,1) HatHandle.Transparency = 0 HatMesh.MeshId = "http://www.roblox.com/asset/?id=62246019" HatMesh.TextureId = "http://www.roblox.com/asset/?id=62246077" --//TITLE\\-- local BillBoardGUI = Instance.new("BillboardGui",Head) local Label = Instance.new("TextLabel",BillBoardGUI) Label.BackgroundTransparency = 1 Label.Position = UDim2.new(0,0,0,-49) Label.TextColor3 = Color3.fromRGB(0,0,0) Label.TextStrokeColor3 = Color3.fromRGB(255,0,0) Label.TextStrokeTransparency = 0 Label.Text = "Demonic Entity" Label.Font = "Bodoni" Label.TextScaled = true BillBoardGUI.AlwaysOnTop = true BillBoardGUI.Size = UDim2.new(0,200,0,50) Label.Size = UDim2.new(0,200,0,50) --//=================================\\ --|| -=ABILITIES/ATTACKS=- || --\\=================================// UIS.InputBegan:connect(function(inputObject, GPE) if not GPE then -- So the player cant use abilities while typing. if inputObject.KeyCode == Enum.KeyCode.Z and Attacking == false then Brimstone() elseif inputObject.KeyCode == Enum.KeyCode.X and Attacking == false then Soul() elseif inputObject.KeyCode == Enum.KeyCode.C and Attacking == false then Blaze() end end end) function Brimstone() print("Activating Brimstone Barrage") CurrentTitle = "Face the fury of brimstone!" Label.Text = CurrentTitle Attacking = true local MeteorCount = math.random(5,10) for i = MeteorCount, 0, 1 do local Part = Instance.new("Part") local Mesh = Instance.new("SpecialMesh") Part.Size = Vector3.new(8,6,8) Part.Transparency = 1 Part.Anchored = false Mesh.Parent = Part Mesh.Scale = Vector3.new(5,5,5) Mesh.MeshId = "http://www.roblox.com/asset/?id=1290033" Mesh.TextureId = "http://www.roblox.com/asset/?id=1290030" local PartX = math.random(Torso.CFrame.x-30,30) local PartZ = math.random(Torso.CFrame.z-30,30) Part.Position = CFrame.new(PartX,Torso.CFrame.Y+30,PartZ) local Fire = Instance.new("Fire",Part) Fire.Size = 100 Fire.Heat = 20 function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then humanoid.Health = 0 Part.Touched:connect(onTouch) if i == MeterorCount then wait(0.4) CurrentTitle = "Demonic Entity" Label.Text = CurrentTitle Attacking = false end end end end end function Soul() print("Activating Soul Strike") CurrentTitle = "With the power of a thousand souls, attack!" Label.Text = CurrentTitle Attacking = true local Soul = Instance.new("Part") Soul.Transparency = 0.3 Soul.Material = "Neon" Soul.Anchored = true Soul.Rotation = Vector3.new(0,0,90) Soul.Color = Color3.fromRGB()(255,255,255) Soul.Size = Vector3.new(38.59, 4.32, 9.58) Soul.Shape = "Cylinder" Soul:SetPrimaryPartCFrame(CFrame.new(Mouse.hit)) function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then humanoid.Health = 0 Soul.Touched:connect(onTouch) wait(0.5) Soul:Destroy() CurrentTitle = "Demonic Entity" Label.Text = CurrentTitle Attacking = false end end end function Blaze() print("Activating Blaze Beam") CurrentTitle = "Feel the pain the sun's concentrated heat!" Label.Text = CurrentTitle Attacking = true local Blaze = Instance.new("Part") Blaze.Shape = "Cylinder" Blaze.Transparency = 0.35 Blaze.Color = Color3.fromRGB(255,0,0) Blaze.CFrame = Torso.CFrame * CFrame.new(0, 0, -2) function onTouch(part) local humanoid = part.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then humanoid.Health = 0 Blaze.Touched:connect(onTouch) wait(0.5) Blaze:Destroy() CurrentTitle = "Demonic Entity" Label.Text = CurrentTitle Attacking = false end end end --//=================================\\ --|| -=USER INTERFACE=- || --\\=================================// local ScreenGui = Instance.new("ScreenGui",LocalPlayer.PlayerGui) local BrimstoneFrame = Instance.new("Frame",ScreenGui) local SoulFrame = Instance.new("Frame",ScreenGui) local BlazeFrame = Instance.new("Frame",ScreenGui) local BrimstoneText = Instance.new("TextLabel",BrimstoneFrame) local SoulText = Instance.new("TextLabel",SoulFrame) local BlazeText = Instance.new("TextLabel",BlazeFrame) --//Brimstone Barrage\\-- BrimstoneFrame.Position = UDim2.new(0.139, 0,0.659, 0) BrimstoneFrame.Size = UDim2.new(0,251,0,101) BrimstoneFrame.Style = "DropShadow" BrimstoneText.Position = UDim2.new(0,0,0.257,0) BrimstoneText.Size = UDim2.new(0,235,0,50) BrimstoneText.Font = "Antique" BrimstoneText.TextColor3 = Color3.fromRGB(255,0,0) BrimstoneText.TextScaled = true BrimstoneText.TextStrokeTransparency = 0 BrimstoneText.Text = "[Z] Brimstone Barrage" BrimstoneText.BackgroundTransparency = 1 --//Soul Strike\\-- SoulFrame.Position = UDim2.new(0.398,0,0.659,0) SoulFrame.Size = UDim2.new(0,251,0,101) SoulFrame.Style = "DropShadow" SoulText.Position = UDim2.new(0,0,0.257,0) SoulText.Size = UDim2.new(0,235,0,50) SoulText.Font = "Antique" SoulText.TextColor3 = Color3.fromRGB(255,0,0) SoulText.TextScaled = true SoulText.TextStrokeTransparency = 0 SoulText.Text = "[X] Soul Strike" SoulText.BackgroundTransparency = 1 --//Blaze Beam\\-- BlazeFrame.Position = UDim2.new(0.677,0,0.659,0) BlazeFrame.Size = UDim2.new(0,251,0,101) BlazeFrame.Style = "DropShadow" BlazeText.Position = UDim2.new(0,0,0.257,0) BlazeText.Size = UDim2.new(0,235,0,50) BlazeText.Font = "Antique" BlazeText.TextColor3 = Color3.fromRGB(255,0,0) BlazeText.TextScaled = true BlazeText.TextStrokeTransparency = 0 BlazeText.Text = "[C] Blaze Beam" BlazeText.BackgroundTransparency = 1