Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent.Equipped:connect(function(Mouse)
- Equipped = true
- game:GetService("ContextActionService"):BindAction("block", Block, true, "q", Enum.KeyCode.ButtonR2)
- game:GetService("ContextActionService"):SetTitle("block", "Block")
- game:GetService("ContextActionService"):SetPosition("block", UDim2.new(0.7, 0, 0.2, 0))
- script.Parent.Wand:FireServer("equipped")
- Mouse.Button1Down:connect(function()
- if player.Clashing.Value == false then
- if not Enabled and Chat ~= "" and Chat:sub(1, 8) ~= "apparate" then --Stupefy type spell
- Enabled = true
- if player.Character.HumanoidRootPart:FindFirstChild("CastTurn") then
- player.Character.HumanoidRootPart.CastTurn:Destroy()
- end
- if Chat:sub(1,8) ~= "propero" then
- local bg = Instance.new("BodyGyro")
- game:GetService("Debris"):AddItem(bg,.75)
- bg.P = 20000
- bg.Name = "CastTurn"
- bg.maxTorque = Vector3.new(0, math.huge, 0)
- bg.cframe = CFrame.new(player.Character.HumanoidRootPart.Position, Mouse.Hit.p)
- bg.Parent = player.Character.HumanoidRootPart
- end
- script.Parent.Attack:FireServer(Chat, Mouse.Hit.p)
- --Chat = ""
- wait(SpellCooldown)
- Enabled = false
- elseif not Enabled and Chat:sub(1, 8) == "apparate" and Chat:sub(1, 9) ~= "apparate " then --Apparate point click
- Enabled = true
- script.Parent.Attack:FireServer(Chat:sub(1, 8), Mouse.Hit.p)
- Chat = ""
- wait(1.5)
- Enabled = false
- elseif not Enabled and Chat:sub(1, 9) == "apparate " then --Apparate person
- Enabled = true
- print(Chat)
- local name = Chat:sub(10)
- local target
- for _, plr in pairs (game.Players:GetPlayers()) do
- if name ~= "" and plr.Name:lower():find(name) == 1 then
- target = plr
- end
- end
- if target == nil or target.Character:FindFirstChild("NotApparatable") then
- script.Parent.Attack:FireServer(Chat:sub(1, 8), Mouse.Hit.p)
- else
- script.Parent.Attack:FireServer(Chat:sub(1, 8), target.Character.UpperTorso.Position)
- end
- Chat = ""
- wait(1.5)
- Enabled = false
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement