--------------------------------------Dont change anything under here!----------------------------------------------


function Setup()
for i,p in pairs(game.Players:children()) do
if (p.Character == wand.Parent) then
 
if (connect ~= nil) then connect:disconnect() end
connect = p.Chatted:connect(PlayerTalked)
owner = p
end
end
end

function PlayerTalked(words)
 
if (string.find(words:lower(), inc:lower()) ~= nil) and (wand.Parent == owner.Character) then
print("Casting the spell ''" ..inc.. "''")
CastSpell()
end
end

function CastSpell()
wand.Activated:wait()
ahem = wand.Parent.Humanoid.TargetPoint
for i = 1, 5 do
lol = Instance.new("Sparkles")
lol.Parent = wand.Parent.Torso
game.Debris:AddItem(lol, .6)
end
bav = Instance.new("BodyAngularVelocity")
bav.angularvelocity = Vector3.new(0,100,0)
bav.maxTorque = Vector3.new(200000,200000,200000)
bav.P = 200000
bav.Parent = wand.Parent.Torso
game.Debris:AddItem(bav, .6)
wait(.5)
wand.Parent.Humanoid.Jump = true
wait()
wand.Parent:MoveTo(ahem)
target = findNearestTorso(stick.Position, 5)
if target ~= nil then
target.Parent:MoveTo(ahem + Vector3.new(math.random(-2,2), 0, math.random(-2,2)))
end
end

wand.Equipped:connect(Setup)
