Advertisement
UnknownZealot

idk what this is so lol??

Aug 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.41 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83.  
  84.  
  85. --//Created by WaverlyCole
  86.  
  87.  
  88.  
  89. player = owner
  90. char = player.Character
  91. humanoid = char.Humanoid
  92. rootpart = char.HumanoidRootPart
  93. torso = char.Torso
  94.  
  95. char.Humanoid.MaxHealth=300
  96. wait()
  97. char.Humanoid.Health=300
  98. char.Humanoid.WalkSpeed=20
  99. --//Joints
  100. N=torso:FindFirstChild("Neck")
  101. RS=torso:FindFirstChild("Right Shoulder")
  102. LS=torso:FindFirstChild("Left Shoulder")
  103. RH=torso:FindFirstChild("Right Hip")
  104. LH=torso:FindFirstChild("Left Hip")
  105. RJ=rootpart:FindFirstChild("RootJoint")
  106. --//Default C0's
  107. NC0=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  108. RSC0=CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  109. LSC0=CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  110. RHC0=CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  111. LHC0=CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  112. RJC0=CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  113. --//Cheats
  114. cframe = CFrame.new
  115. angle = CFrame.Angles
  116. radian = math.rad
  117. random = math.random
  118. --//Variables
  119. local idle,walk,fall,jump = false,false,false,false
  120. local jumpcheck = false
  121. local specialanim = nil
  122. local height = 1
  123. --//Functions
  124. local function Split(inputstr,sep)
  125. local t,i = {},1
  126. for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
  127. t[i] = str
  128. i = i + 1
  129. end
  130. return t
  131. end
  132. local function weldBetween(a, b)
  133. local weld = Instance.new("ManualWeld")
  134. weld.Part0 = a
  135. weld.Part1 = b
  136. weld.C0 = CFrame.new()
  137. weld.C1 = b.CFrame:inverse() * a.CFrame
  138. weld.Parent = a
  139. return weld;
  140. end
  141. local getChar = function(part)
  142. if part.Parent:FindFirstChild('Humanoid') then
  143. return part.Parent
  144. elseif part.Parent.Parent:FindFirstChild('Humanoid') then
  145. return part.Parent.Parent
  146. else
  147. return nil
  148. end
  149. end
  150. local animate = function(joint,prop,cfrmz,alp)
  151. joint[prop]=joint[prop]:lerp(cfrmz,alp)
  152. end
  153. local keyDown = function(key)
  154. if key == 'q' then
  155. --
  156. end
  157. end
  158. --//Movement
  159. game:service'RunService'.RenderStepped:connect(function()
  160. if rootpart.Velocity.y < -1 and not idle then
  161. idle,walk,fall,jump = false,false,true,false
  162. elseif jumpcheck then
  163. idle,walk,fall,jump = false,false,false,true
  164. elseif humanoid.MoveDirection ~= Vector3.new(0,0,0) then
  165. idle,walk,fall,jump = false,true,false,false
  166. elseif humanoid.MoveDirection == Vector3.new(0,0,0) then
  167. idle,walk,fall,jump = true,false,false,false
  168. end
  169. end)
  170. humanoid.StateChanged:connect(function(state)
  171. if state == Enum.HumanoidStateType.Jumping then
  172. jumpcheck = true
  173. else
  174. jumpcheck = false
  175. end
  176. end)
  177. --//Created by WaverlyCole
  178. --//Animate
  179. char.Animate.Disabled = true
  180. humanoid.Animator:Destroy()
  181. local playAnimation = coroutine.wrap(function()
  182. while true do
  183. game:service'RunService'.RenderStepped:wait()
  184. if specialanim then
  185. specialanim()
  186. elseif idle then
  187. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(math.sin(tick()*3)),radian(0),radian(-60)),0.3)
  188. animate(RS,'C0',RSC0*cframe(.1,0,0)*angle(radian(math.sin(tick())*5),radian(0),radian(60 + math.sin(tick()*2))*-5),0.3)
  189. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(math.sin(tick())*5),radian(0),radian(10)),0.3)
  190. animate(RH,'C0',RHC0*cframe(0,.1 + math.sin(tick()*3)/20,-.1)*angle(radian(0),radian(-30),radian(0)),0.3)
  191. animate(LH,'C0',LHC0*cframe(0,.1 + math.sin(tick()*3)/20,.1)*angle(radian(-5),radian(-15),radian(0)),0.3)
  192. animate(RJ,'C0',RJC0*cframe(0,0,-.1 + math.sin(tick()*3)/-20)*angle(radian(0),radian(0),radian(70)),0.3)
  193. elseif walk then
  194. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(-3),radian(0),radian(0)),0.3)
  195. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(math.sin(tick()*3)),radian(20 + math.sin(tick()*3)),radian(70 + math.sin(tick()*3)*2)),0.3)
  196. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(math.sin(tick()*2)*5),radian(30 + math.sin(tick()*2)*5)),0.3)
  197. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))*40)),0.3)
  198. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*-(char.Humanoid.WalkSpeed/2))*-40)),0.3)
  199. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(5),radian(0),radian(0)),0.3)
  200. elseif fall then
  201. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  202. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  203. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  204. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  205. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  206. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  207. elseif jump then
  208. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  209. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  210. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  211. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  212. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  213. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(0)),0.3)
  214. end
  215. end
  216. end)
  217. wand = Instance.new('Part')
  218. wand.Name = 'Wand'
  219. wandmesh = Instance.new('SpecialMesh',wand)
  220. wandmesh.MeshId = 'http://www.roblox.com/asset?id=69886132'
  221. wandmesh.Scale = Vector3.new(1,1,1)
  222. wandmesh.TextureId = 'http://www.roblox.com/asset/?id=31656155'
  223. wand.Size = Vector3.new(.4,.4,2)
  224. wand.CanCollide=false
  225. wand.CFrame = char['Right Arm'].CFrame * CFrame.Angles(0,math.rad(180),0) * CFrame.new(0,-1,.8)
  226. wand.Parent = char
  227. local weld = weldBetween(wand,char['Right Arm'])
  228. WANDC0 = weld.C0
  229. WANDWELD = weld
  230. sound1 = Instance.new('Sound',wand)
  231. sound1.SoundId = 'http://www.roblox.com/asset/?id=193316310'
  232. sound1.Volume = 2
  233. playAnimation()
  234. spawn(function()
  235. local pointer = Instance.new('Part')
  236. pointer.Size = Vector3.new(.5,.5,.5)
  237. pointer.CanCollide=false
  238. pointer.Anchored=true
  239. pointer.Material = 'Neon'
  240. pointer.TopSurface = 10
  241. pointer.BottomSurface = 10
  242. pointer.BrickColor = BrickColor.new('White')
  243. pointer.Shape = 'Ball'
  244. pointer.Parent = char
  245. game:service'RunService'.RenderStepped:connect(function()
  246. pointer.CFrame = mouse.Hit
  247. end)
  248. end)
  249. local spellAnimation = function()
  250. spawn(function()
  251. specialanim = function()
  252. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(-30),radian(0),radian(0)),0.3)
  253. if idle then
  254. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(math.sin(tick()*3)),radian(0),radian(-60)),0.3)
  255. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(math.sin(tick())*5),radian(0),radian(10)),0.3)
  256. animate(RH,'C0',RHC0*cframe(0,.1 + math.sin(tick()*3)/20,-.1)*angle(radian(0),radian(-30),radian(0)),0.3)
  257. animate(LH,'C0',LHC0*cframe(0,.1 + math.sin(tick()*3)/20,.1)*angle(radian(-5),radian(-15),radian(0)),0.3)
  258. animate(RJ,'C0',RJC0*cframe(0,0,-.1 + math.sin(tick()*3)/-20)*angle(radian(0),radian(0),radian(70)),0.3)
  259. else
  260. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(-3),radian(0),radian(0)),0.3)
  261. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(math.sin(tick()*2)*5),radian(30 + math.sin(tick()*2)*5)),0.3)
  262. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))*40)),0.3)
  263. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*-(char.Humanoid.WalkSpeed/2))*-40)),0.3)
  264. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(5),radian(0),radian(0)),0.3)
  265. end
  266. end
  267. wait(.1)
  268. specialanim = function()
  269. animate(RS,'C0',RSC0*cframe(0,0,0)*angle(radian(-20),radian(20),radian(90)),0.3)
  270. if idle then
  271. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(math.sin(tick()*3)),radian(0),radian(-60)),0.3)
  272. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(math.sin(tick())*5),radian(0),radian(10)),0.3)
  273. animate(RH,'C0',RHC0*cframe(0,.1 + math.sin(tick()*3)/20,-.1)*angle(radian(0),radian(-30),radian(0)),0.3)
  274. animate(LH,'C0',LHC0*cframe(0,.1 + math.sin(tick()*3)/20,.1)*angle(radian(-5),radian(-15),radian(0)),0.3)
  275. animate(RJ,'C0',RJC0*cframe(0,0,-.1 + math.sin(tick()*3)/-20)*angle(radian(0),radian(0),radian(70)),0.3)
  276. else
  277. animate(N,'C0',NC0*cframe(0,0,0)*angle(radian(-3),radian(0),radian(0)),0.3)
  278. animate(LS,'C0',LSC0*cframe(0,0,0)*angle(radian(0),radian(math.sin(tick()*2)*5),radian(30 + math.sin(tick()*2)*5)),0.3)
  279. animate(RH,'C0',RHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*(char.Humanoid.WalkSpeed/2))*40)),0.3)
  280. animate(LH,'C0',LHC0*cframe(0,0,0)*angle(radian(0),radian(0),radian(math.sin(tick()*-(char.Humanoid.WalkSpeed/2))*-40)),0.3)
  281. animate(RJ,'C0',RJC0*cframe(0,0,0)*angle(radian(5),radian(0),radian(0)),0.3)
  282. end
  283. end
  284. wait(.5)
  285. specialanim = nil
  286. end)
  287. end
  288. local createSpell = function(speed,color,sound,spread,instant)
  289. if instant then
  290. return Instance.new'Part',mouse.hit
  291. end
  292. local hitpart = nil
  293. local connectPoints = function(effect,core,point1,point2,color)
  294. local spellTrail = Instance.new('Part')
  295. spellTrail.BrickColor = BrickColor.new(color)
  296. spellTrail.TopSurface = 10
  297. spellTrail.BottomSurface = 10
  298. spellTrail.CanCollide = false
  299. spellTrail.Anchored = true
  300. spellTrail.Transparency = .3
  301. spellTrail.Material = 'Neon'
  302. local magnitude = (point1.p - point2.p).magnitude
  303. local ray = Ray.new(point1.p,(point2.p - point1.p).unit*magnitude)
  304. local part,pos,normal = workspace:FindPartOnRayWithIgnoreList(ray,char:GetChildren(),false,true)
  305. if part then
  306. hitpart = part
  307. end
  308. if part and part.Name ~= 'Base' then
  309. magnitude = (point1.p - part.CFrame.p).magnitude
  310. spellTrail.Size = Vector3.new(.7,.7,magnitude)
  311. spellTrail.CFrame = CFrame.new(point1.p,part.CFrame.p) * CFrame.new(0,0,-magnitude/2)
  312. else
  313. magnitude = (point1.p - point2.p).magnitude
  314. spellTrail.Size = Vector3.new(.7,.7,magnitude)
  315. spellTrail.CFrame = CFrame.new(point1.p,point2.p) * CFrame.new(0,0,-magnitude/2)
  316. end
  317. local lockcframe = spellTrail.CFrame
  318. spellTrail.Parent = core
  319. local centerTrail = spellTrail:Clone()
  320. centerTrail.BrickColor = BrickColor.new('White')
  321. centerTrail.Size = Vector3.new(.2,.2,magnitude)
  322. centerTrail.CFrame = spellTrail.CFrame
  323. centerTrail.Transparency = 0
  324. centerTrail.Parent = spellTrail
  325. effect.CFrame = spellTrail.CFrame * CFrame.new(0,0,-magnitude/2)
  326. spawn(function()
  327. while spellTrail.Parent do
  328. spellTrail.Transparency = spellTrail.Transparency + .05
  329. centerTrail.Transparency = centerTrail.Transparency + .07
  330. spellTrail.Size = Vector3.new(spellTrail.Size.X-.04,spellTrail.Size.Y-.04,magnitude)
  331. centerTrail.Size = Vector3.new(centerTrail.Size.X-.01,centerTrail.Size.Y-.01,magnitude)
  332. spellTrail.CFrame = lockcframe
  333. centerTrail.CFrame = lockcframe
  334. game:service'RunService'.RenderStepped:wait()
  335. end
  336. end)
  337. spawn(function()
  338. wait(.2)
  339. spellTrail:Destroy()
  340. end)
  341. end
  342. sound:Play()
  343. local hit = mouse.Hit
  344. local spellCore = Instance.new('Part')
  345. spellCore.Size = Vector3.new(1,1,1)
  346. spellCore.CanCollide = false
  347. spellCore.Anchored = true
  348. spellCore.Transparency = 1
  349. spellCore.CFrame = CFrame.new(wand.CFrame.p,hit.p)
  350. spellCore.Parent=char
  351. local spellEffect = Instance.new('Part')
  352. spellEffect.BrickColor = BrickColor.new(color)
  353. spellEffect.Size = Vector3.new(.8,.8,.8)
  354. spellEffect.Material = 'Neon'
  355. spellEffect.Shape = 'Ball'
  356. spellEffect.TopSurface = 10
  357. spellEffect.BottomSurface = 10
  358. spellEffect.CanCollide = false
  359. spellEffect.Anchored = true
  360. spellEffect.CFrame = CFrame.new(wand.CFrame*CFrame.new(0,0,1).p,hit.p)
  361. spellEffect.Parent=char
  362. local light = Instance.new('PointLight',spellEffect)
  363. light.Color = BrickColor.new(color).Color
  364. light.Brightness = 3
  365. light.Range = 6
  366. if spellname == 'confringo' then
  367. Instance.new('Fire',spellEffect)
  368. end
  369. spawn(function()
  370. local lastpos = nil
  371. local follow = false
  372. while hitpart == nil do
  373. follow = not follow
  374. local pos1 = wand.CFrame*CFrame.new(0,0,1)
  375. if lastpos then
  376. pos1 = lastpos
  377. end
  378. game:service'RunService'.RenderStepped:wait()
  379. local pos2 = spellCore.CFrame*CFrame.new(0,0,1)
  380. if not follow then
  381. local min,max = -.5,.5
  382. if spread then
  383. min,max=-spread,spread
  384. end
  385. local n1 = min+(math.random()*(max-min))
  386. local n2 = min+(math.random()*(max-min))
  387. --local n3 = min+(math.random()*(max-min))
  388. pos2 = spellCore.CFrame * CFrame.new(n1,n2,0)
  389. else
  390. game:service'RunService'.RenderStepped:wait()
  391. end
  392. lastpos = pos2
  393. connectPoints(spellEffect,spellCore,pos1,pos2,color)
  394. end
  395. end)
  396. while hitpart == nil do
  397. spellCore.CFrame = spellCore.CFrame * CFrame.new(0,0,-speed)
  398. game:service'RunService'.RenderStepped:wait()
  399. end
  400. spawn(function()
  401. local particle = Instance.new('ParticleEmitter',hitpart)
  402. particle.LightEmission = 1
  403. particle.LightInfluence = 0
  404. particle.Size = NumberSequence.new(.1)
  405. particle.Texture = 'rbxassetid://134342987'
  406. particle.Color = ColorSequence.new(BrickColor.new(color).Color)
  407. --particle.LockedToPart = true
  408. particle.EmissionDirection = 'Front'
  409. particle.Lifetime = NumberRange.new(2)
  410. particle.Rate = 500
  411. particle.SpreadAngle = Vector2.new(90,90)
  412. wait(.2)
  413. spellEffect:Destroy()
  414. wait(.2)
  415. particle.Enabled = false
  416. end)
  417. return hitpart,spellCore.CFrame or nil,spellCore.CFrame
  418. end
  419. --//Created by WaverlyCole
  420. spellname = ''
  421. spellpower = 0
  422. player.Chatted:connect(function(msg)
  423. local args = Split(msg,' ')
  424. spellname = args[1]
  425. spellpower = 1
  426. if args[2] == 'maxima' then
  427. spellpower = 2
  428. end
  429. end)
  430. mouse.Button1Down:connect(function()
  431. if spellname == 'bombarda' then
  432. spellname = ''
  433. spellAnimation()
  434. wait(.2)
  435. local hit,endcframe = createSpell(3,'Persimmon',sound1,2)
  436. local explosion = Instance.new('Explosion')
  437. explosion.Position = endcframe.p
  438. explosion.BlastRadius = 4
  439. if spellpower == 2 then
  440. explosion.BlastRadius = 20
  441. end
  442. explosion.Parent=workspace
  443. spellpower = 0
  444. elseif spellname == 'nako' then
  445. spellname = ''
  446. spellAnimation()
  447. wait(.2)
  448. local hit,endcframe = createSpell(3,'Brick yellow',sound1)
  449. local human = getChar(hit)
  450. if human then
  451. pcall(function()
  452. human:FindFirstChild('Pants'):Destroy()
  453. human:FindFirstChild('Shirt'):Destroy()
  454. end)
  455. end
  456. spellpower = 0
  457. elseif spellname == 'confringo' then
  458. spellname = ''
  459. spellAnimation()
  460. wait(.2)
  461. local hit,endcframe = createSpell(3,'Bright red',sound1)
  462. local human = getChar(hit)
  463. if human then
  464. pcall(function()
  465. Instance.new('Fire',human.Head)
  466. while wait(.01) do
  467. human.Humanoid.Health = human.Humanoid.Health - 1
  468. if spellpower == 2 then
  469. human.Humanoid.Health = human.Humanoid.Health - 1
  470. end
  471. end
  472. end)
  473. end
  474. spellpower = 0
  475. elseif spellname == 'impedimenta' then
  476. spellname = ''
  477. spellAnimation()
  478. wait(.2)
  479. local hit,endcframe = createSpell(3,'Salmon',sound1)
  480. local human = getChar(hit)
  481. if human then
  482. for i = 1,500 do
  483. human.Humanoid.PlatformStand = true
  484. human.Humanoid.JumpPower = 0
  485. wait()
  486. end
  487. end
  488. spellpower = 0
  489. elseif spellname == 'episky' then
  490. spellname = ''
  491. spellAnimation()
  492. wait(.2)
  493. local hit,endcframe = createSpell(3,'Lime green',sound1)
  494. local human = getChar(hit)
  495. if human then
  496. pcall(function()
  497. if spellpower == 2 then
  498. human.Humanoid.Health = human.Humanoid.MaxHealth
  499. else
  500. for i = 1,50 do
  501. wait()
  502. human.Humanoid.Health = human.Humanoid.Health + 1
  503. end
  504. end
  505. end)
  506. end
  507. spellpower = 0
  508. elseif spellname == 'accio' then
  509. spellname = ''
  510. spellAnimation()
  511. wait(.2)
  512. local speed = 3
  513. if spellpower == 2 then
  514. speed = 15
  515. end
  516. local hit,endcframe = createSpell(speed,'Lapis',sound1)
  517. if hit.Name == 'Base' then return end
  518. hit.Anchored = true
  519. repeat
  520. hit.CFrame = CFrame.new(hit.CFrame.p,wand.CFrame.p) * CFrame.new(0,0,-1)
  521. wait()
  522. until (hit.CFrame.p - wand.CFrame.p).magnitude < 10
  523. hit.Anchored = false
  524. spellpower = 0
  525. elseif spellname == 'colloshoo' then
  526. spellname = ''
  527. spellAnimation()
  528. wait(.2)
  529. local hit,endcframe = createSpell(3,'White',sound1)
  530. local human = getChar(hit)
  531. if human then
  532. pcall(function()
  533. human['Left Leg'].Anchored = true
  534. human['Right Leg'].Anchored = true
  535. end)
  536. end
  537. spellpower = 0
  538. elseif spellname == 'deletrius' then
  539. spellname = ''
  540. spellAnimation()
  541. wait(.2)
  542. local speed = 5
  543. if spellpower == 2 then
  544. speed = 6
  545. end
  546. local hit,endcframe = createSpell(speed,'Really red',sound1)
  547. if hit.Name ~= 'Base' then hit:Destroy() end
  548. spellpower = 0
  549. elseif spellname == 'stupefy' then
  550. spellname = ''
  551. spellAnimation()
  552. wait(.2)
  553. local speed = 5
  554. if spellpower == 2 then
  555. speed = 6
  556. end
  557. local hit,endcframe = createSpell(speed,'Really red',sound1)
  558. local human = getChar(hit)
  559. if human then
  560. human.Humanoid.Health = human.Humanoid.Health - 20
  561. human.Humanoid.PlatformStand = true
  562. local force = Instance.new('BodyForce',human.HumanoidRootPart)
  563. local power = 3000 * spellpower
  564. force.Force = CFrame.new(wand.CFrame.p,hit.CFrame.p).lookVector *power + Vector3.new(0,4000 + 500*spellpower,0)
  565. wait(.5)
  566. force:Destroy()
  567. wait(3)
  568. hit.Parent.Humanoid.PlatformStand = false
  569. end
  570. spellpower = 0
  571. elseif spellname == 'expelliarmus' then
  572. spellname = ''
  573. spellAnimation()
  574. wait(.2)
  575. local hit,endcframe = createSpell(5,'Really red',sound1)
  576. local human = getChar(hit)
  577. if human then
  578. pcall(function()
  579. for i,v in pairs(human:children()) do
  580. if v.ClassName == 'Tool' or v.ClassName == 'Hopperbin' then
  581. v.Parent=workspace
  582. if v.Handle then
  583. local force = Instance.new('BodyForce',v.Handle)
  584. force.Force = CFrame.new(v.Handle.CFrame.p,char.Torso.CFrame.p).lookVector*500
  585. wait(.1)
  586. force:Destroy()
  587. end
  588. end
  589. end
  590. end)
  591. end
  592. spellpower = 0
  593. elseif spellname == 'calvario' then
  594. spellname = ''
  595. spellAnimation()
  596. wait(.2)
  597. local hit,endcframe = createSpell(3,'Light red',sound1)
  598. local human = getChar(hit)
  599. if human then
  600. pcall(function()
  601. for i,v in pairs(human:children()) do
  602. if v.ClassName == "Accessory" then
  603. v.Handle.Name = 'rekt'
  604. v.Parent=workspace
  605. end
  606. end
  607. end)
  608. end
  609. spellpower = 0
  610. elseif spellname == 'aguamente' then
  611. spellname = ''
  612. spellAnimation()
  613. wait(.2)
  614. local hit,endcframe = createSpell(3,'Medium blue',sound1)
  615. if spellpower == 1 then
  616. workspace.Terrain:FillBlock(endcframe,Vector3.new(4,2,4),'Water')
  617. else
  618. workspace.Terrain:FillBlock(endcframe,Vector3.new(15,3,15),'Water')
  619. end
  620. spellpower = 0
  621. elseif spellname == 'testspell' then
  622. spellAnimation()
  623. wait(.2)
  624. local hit,endcframe = createSpell(3,'White',sound1)
  625. --spellname,spellpower = '',0
  626. elseif spellname == 'appa' then
  627. spellname = ''
  628. spellAnimation()
  629. wait(.2)
  630. local hit,endcframe = createSpell(8,'Cyan',sound1)
  631. player.Character.Torso.CFrame = endcframe
  632. spellpower = 0
  633. elseif spellname == 'protego' then
  634. spellname = ''
  635. spellAnimation()
  636. --wait(.2)
  637. local hit,endcframe = createSpell(10,'Lime green',sound1,1,true)
  638. local p = Instance.new'Part'
  639. p.Size = Vector3.new(15,15,3)
  640. p.CanCollide = true
  641. p.Material = 'Neon'
  642. p.Anchored = true
  643. p.Transparency = .5
  644. p.BrickColor = BrickColor.new'Cyan'
  645. p.CFrame = CFrame.new(player.Character.Torso.CFrame.p,endcframe.p) * CFrame.new(0,0,-7)
  646. p.Parent = workspace
  647. while p.Parent and p.Transparency <= .9 do
  648. p.CFrame = p.CFrame * CFrame.new(0,0,-.3)
  649. game:service'RunService'.RenderStepped:wait()
  650. p.Transparency = p.Transparency + .01
  651. end
  652. p:Destroy()
  653. spellpower = 0
  654. end
  655. end)
  656. --//Created by WaverlyCole
  657. mouse.KeyDown:connect(keyDown)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement