Advertisement
Guest User

FE Wizard

a guest
Dec 6th, 2019
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151. --[[
  152. Script Version 1.4
  153.  
  154. Wand generation A3000, A.K.A. Wanda, was used by novice warlocks and witches to practice/use magic.
  155. It was developed by the UMTAWC (United Magical Theory And Wizardry Comittee, abbreviation pronounced "um-talk")
  156. Wood carved and infused with magic properties by DarkShadow6
  157. --]]
  158. --http://www.roblox.com/Asset/?id=22968437
  159.  
  160. if script == nil then return end
  161.  
  162.  
  163. Player = game:GetService("Players"):FindFirstChild("luigi4771")
  164. Name = "Wanda"
  165. selected = false
  166. Button1Down = false
  167. canFire = true
  168. spell = 0
  169. spellHotkey1 = 0
  170. spellHotkey2 = 0
  171. spellHotkey3 = 0
  172. spellHotkey1Delay = 0
  173. spellHotkey2Delay = 0
  174. spellHotkey3Delay = 0
  175. spellText = "None"
  176. power = 100
  177.  
  178.  
  179. spellGui = Instance.new("ScreenGui")
  180. spellGui.Name = Name
  181. local frame = Instance.new("Frame")
  182. frame.Name = "Frame"
  183. frame.Size = UDim2.new(0, 165, 0, 60)
  184. frame.Position = UDim2.new(0, 0, 1, -60)
  185. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  186. frame.BorderColor3 = Color3.new(0, 0, 0)
  187. frame.Parent = spellGui
  188. local label = Instance.new("TextLabel")
  189. label.Name = "Weapon"
  190. label.Text = "Weapon: " ..Name
  191. label.Size = UDim2.new(1, 0, 0, 20)
  192. label.Position = UDim2.new(0, 0, 0, 0)
  193. label.BackgroundColor3 = Color3.new(1, 0, 0)
  194. label.BorderColor3 = Color3.new(0, 0, 0)
  195. label.Parent = frame
  196. local label = Instance.new("TextLabel")
  197. label.Name = "SpellPrefix"
  198. label.Text = " Spell:"
  199. label.TextXAlignment = "Left"
  200. label.Size = UDim2.new(1, 0, 0, 20)
  201. label.Position = UDim2.new(0, 0, 0, 20)
  202. label.BackgroundColor3 = Color3.new(1, 1, 1)
  203. label.BorderColor3 = Color3.new(0, 0, 0)
  204. label.Parent = frame
  205. local label = Instance.new("TextLabel")
  206. label.Name = "Spell"
  207. label.Text = "None"
  208. label.TextXAlignment = "Right"
  209. label.Size = UDim2.new(1, 0, 0, 20)
  210. label.Position = UDim2.new(0, -10, 0, 20)
  211. label.BackgroundTransparency = 1
  212. label.BorderSizePixel = 0
  213. label.Parent = frame
  214. local label = Instance.new("TextLabel")
  215. label.Name = "PowerPrefix"
  216. label.Text = " Power:"
  217. label.TextXAlignment = "Left"
  218. label.Size = UDim2.new(1, 0, 0, 20)
  219. label.Position = UDim2.new(0, 0, 0, 40)
  220. label.BackgroundColor3 = Color3.new(1, 1, 1)
  221. label.BorderColor3 = Color3.new(0, 0, 0)
  222. label.Parent = frame
  223. local label = Instance.new("TextLabel")
  224. label.Name = "Power"
  225. label.Text = "100"
  226. label.TextXAlignment = "Right"
  227. label.Size = UDim2.new(1, 0, 0, 20)
  228. label.Position = UDim2.new(0, -10, 0, 40)
  229. label.BackgroundTransparency = 1
  230. label.BorderSizePixel = 0
  231. label.Parent = frame
  232.  
  233.  
  234. function updateGui(format)
  235. if selected == false then return end
  236. if Player:FindFirstChild("PlayerGui") == nil then Instance.new("PlayerGui").Parent = Player end
  237. if Player.PlayerGui:FindFirstChild(Name) == nil then
  238. spellGui:Clone().Parent = Player.PlayerGui
  239. end
  240. Player.PlayerGui[Name].Frame.Spell.Text = spellText
  241. if power <= 0 then
  242. Player.PlayerGui[Name].Frame.Power.Text = "OVERHEAT (" ..math.abs(power).. ")"
  243. else
  244. Player.PlayerGui[Name].Frame.Power.Text = power
  245. end
  246. end
  247.  
  248.  
  249. function updateSpellText()
  250. if spell == 1 then
  251. spellText = "Arefu Slash (1P)"
  252. elseif spell == 2 then
  253. spellText = "Arefu Metoria (50P)"
  254. elseif spell == 3 then
  255. spellText = "Eccrando Bolt (25P)"
  256. elseif spell == 4 then
  257. spellText = "Eccrando Strike (~60P)"
  258. elseif spell == 5 then
  259. spellText = "Thius Dae (1P/2ms)"
  260. elseif spell == 6 then
  261. spellText = "Thius Heed (1P/2ms)"
  262. elseif spell == 7 then
  263. spellText = "Combuscus Phore (75P)"
  264. elseif spell == 8 then
  265. spellText = "Combuscus Burn (10P)"
  266. elseif spell == 9 then
  267. spellText = "Combuscus Vortex (50P)"
  268. elseif spell == 10 then
  269. spellText = "C. Phore Nexus (100P)"
  270. elseif spell == 11 then
  271. spellText = "Kanamla Cysis (2P/1sec)"
  272. elseif spell == 12 then
  273. spellText = "Kanamla Tepidift (50P)"
  274. elseif spell == 13 then
  275. spellText = "Kanamla Jump (5P)"
  276. elseif spell == 14 then
  277. spellText = "Candora Hide (2P/1sec)"
  278. elseif spell == 15 then
  279. spellText = "Duraen Control (1P/?ms)"
  280. elseif spell == 16 then
  281. spellText = "Duraen Switch (?P)"
  282. else
  283. spellText = "None"
  284. end
  285. end
  286.  
  287.  
  288. function makeParts(format)
  289. local model = Instance.new("Model")
  290. model.Name = Name
  291. model.Parent = Player.Character
  292. local pm = Instance.new("Part")
  293. pm.Name = "Handle"
  294. pm.FormFactor = "Custom"
  295. pm.Size = Vector3.new(1, 1, 1)
  296. pm.BrickColor = BrickColor.new("Reddish brown")
  297. pm.Locked = true
  298. pm.TopSurface = 0
  299. pm.BottomSurface = 0
  300. pm.Parent = model
  301. local m = Instance.new("SpecialMesh")
  302. m.MeshType = "Head"
  303. m.Scale = Vector3.new(0.3, 2, 0.3)
  304. m.Parent = pm
  305. if format ~= nil then
  306. local w = Instance.new("Weld")
  307. w.Part0 = pm
  308. if format == "hand" then
  309. w.Part1 = Player.Character:FindFirstChild("Right Arm")
  310. w.C0 = CFrame.new(0, -0.75, 0.9) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  311. w.C1 = CFrame.new()
  312. w.Parent = pm
  313. elseif format == "holster" then
  314. w.Part1 = Player.Character:FindFirstChild("Right Leg")
  315. w.C0 = CFrame.new(0, 0.1, -0.55) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  316. w.C1 = CFrame.new()
  317. w.Parent = pm
  318. model.Name = Name.. " (Holstered)"
  319. else
  320. print("Error: Incorrect format string!")
  321. end
  322. end
  323. local s = Instance.new("Sound")
  324. s.Name = "Shine"
  325. s.SoundId = "http://www.roblox.com/Asset/?id=2101144"
  326. s.Volume = 1
  327. s.Pitch = 1
  328. s.Looped = false
  329. s.Parent = pm
  330. local s = Instance.new("Sound")
  331. s.Name = "Bolt"
  332. s.SoundId = "http://www.roblox.com/Asset/?id=2974000"
  333. s.Volume = 1
  334. s.Pitch = 1
  335. s.Looped = false
  336. s.Parent = pm
  337. local s = Instance.new("Sound")
  338. s.Name = "Impact1"
  339. s.SoundId = "http://www.roblox.com/Asset/?id=10209596"
  340. s.Volume = 1
  341. s.Pitch = 1
  342. s.Looped = false
  343. s.Parent = pm
  344. local s = Instance.new("Sound")
  345. s.Name = "Charge1"
  346. s.SoundId = "http://www.roblox.com/Asset/?id=1369158"
  347. s.Volume = 1
  348. s.Pitch = 1
  349. s.Looped = false
  350. s.Parent = pm
  351. local s = Instance.new("Sound")
  352. s.Name = "Charge2"
  353. s.SoundId = "http://www.roblox.com/Asset/?id=2101137"
  354. s.Volume = 1
  355. s.Pitch = 1
  356. s.Looped = false
  357. s.Parent = pm
  358. local s = Instance.new("Sound")
  359. s.Name = "Charge3"
  360. s.SoundId = "http://www.roblox.com/Asset/?id=2785493"
  361. s.Volume = 1
  362. s.Pitch = 1
  363. s.Looped = false
  364. s.Parent = pm
  365. local s = Instance.new("Sound")
  366. s.Name = "Charge4"
  367. s.SoundId = "http://www.roblox.com/Asset/?id=35275769"
  368. s.Volume = 1
  369. s.Pitch = 1
  370. s.Looped = false
  371. s.Parent = pm
  372. local s = Instance.new("Sound")
  373. s.Name = "Fire1"
  374. s.SoundId = "http://www.roblox.com/Asset/?id=10209268"
  375. s.Volume = 1
  376. s.Pitch = 1
  377. s.Looped = false
  378. s.Parent = pm
  379. local s = Instance.new("Sound")
  380. s.Name = "Fire2"
  381. s.SoundId = "http://www.roblox.com/Asset/?id=13775466"
  382. s.Volume = 1
  383. s.Pitch = 1
  384. s.Looped = false
  385. s.Parent = pm
  386. local s = Instance.new("Sound")
  387. s.Name = "Fire3"
  388. s.SoundId = "http://www.roblox.com/Asset/?id=2767090"
  389. s.Volume = 1
  390. s.Pitch = 1
  391. s.Looped = false
  392. s.Parent = pm
  393. local s = Instance.new("Sound")
  394. s.Name = "Fire4"
  395. s.SoundId = "http://www.roblox.com/Asset/?id=2800815"
  396. s.Volume = 1
  397. s.Pitch = 1
  398. s.Looped = false
  399. s.Parent = pm
  400. local s = Instance.new("Sound")
  401. s.Name = "Fire5"
  402. s.SoundId = "http://www.roblox.com/Asset/?id=2974249"
  403. s.Volume = 1
  404. s.Pitch = 1
  405. s.Looped = false
  406. s.Parent = pm
  407. local p = Instance.new("Part")
  408. p.Name = "Source"
  409. p.FormFactor = "Custom"
  410. p.Size = Vector3.new(1, 1, 1)
  411. p.Transparency = 1
  412. p.BrickColor = BrickColor.new("Really black")
  413. p.CanCollide = false
  414. p.Locked = true
  415. p.TopSurface = 0
  416. p.BottomSurface = 0
  417. p.Parent = model
  418. local m = Instance.new("SpecialMesh")
  419. m.MeshType = "Sphere"
  420. m.Scale = Vector3.new(1, 1, 1)
  421. m.Parent = p
  422. local w = Instance.new("Weld")
  423. w.Part0 = p
  424. w.Part1 = pm
  425. w.C0 = CFrame.new()
  426. w.C1 = CFrame.new(0, 1, 0)
  427. w.Parent = p
  428. local f = Instance.new("Fire")
  429. f.Enabled = false
  430. f.Name = "Fire"
  431. f.Heat = 0
  432. f.Size = 1
  433. f.Parent = p
  434. for i, p in pairs(model.Handle:GetChildren()) do if p.ClassName == "Sound" then p:Play() m = Instance.new("Message") m.Parent = model m.Text = p.Name wait(2) m:Remove() end end
  435. end
  436.  
  437.  
  438. function removeParts(format)
  439. if format == "hand" then
  440. if Player.Character:FindFirstChild(Name) ~= nil then
  441. Player.Character[Name]:Remove()
  442. end
  443. elseif format == "holster" then
  444. if Player.Character:FindFirstChild(Name.. " (Holstered)") ~= nil then
  445. Player.Character[Name.. " (Holstered)"]:Remove()
  446. end
  447. end
  448. end
  449.  
  450.  
  451. function SetAngle(Joint, Angle, Character)
  452. if Character == nil then return false end
  453. local Joints = {
  454. Character.Torso:FindFirstChild("Right Shoulder 2"),
  455. Character.Torso:FindFirstChild("Left Shoulder 2"),
  456. Character.Torso:FindFirstChild("Right Hip 2"),
  457. Character.Torso:FindFirstChild("Left Hip 2")
  458. }
  459. if Joints[Joint] == nil then return false end
  460. if Joint == 1 or Joint == 3 then
  461. Joints[Joint].DesiredAngle = Angle
  462. end
  463. if Joint == 2 or Joint == 4 then
  464. Joints[Joint].DesiredAngle = -Angle
  465. end
  466. end
  467.  
  468.  
  469. function ForceAngle(Joint, Angle, Character)
  470. if Character == nil then return false end
  471. local Joints = {
  472. Character.Torso:FindFirstChild("Right Shoulder 2"),
  473. Character.Torso:FindFirstChild("Left Shoulder 2"),
  474. Character.Torso:FindFirstChild("Right Hip 2"),
  475. Character.Torso:FindFirstChild("Left Hip 2")
  476. }
  477. if Joints[Joint] == nil then return false end
  478. if Joint == 1 or Joint == 3 then
  479. Joints[Joint].DesiredAngle = Angle
  480. Joints[Joint].CurrentAngle = Angle
  481. end
  482. if Joint == 2 or Joint == 4 then
  483. Joints[Joint].DesiredAngle = -Angle
  484. Joints[Joint].CurrentAngle = -Angle
  485. end
  486. end
  487.  
  488.  
  489. function SetSpeed(Joint, Speed, Character)
  490. if Character == nil then return false end
  491. local Joints = {
  492. Character.Torso:FindFirstChild("Right Shoulder 2"),
  493. Character.Torso:FindFirstChild("Left Shoulder 2"),
  494. Character.Torso:FindFirstChild("Right Hip 2"),
  495. Character.Torso:FindFirstChild("Left Hip 2")
  496. }
  497. if Joints[Joint] == nil then return false end
  498. Joints[Joint].MaxVelocity = Speed
  499. end
  500.  
  501.  
  502. function DisableLimb(Limb, Character)
  503. if Character == nil then return false end
  504. if Character:FindFirstChild("Torso") == nil then return false end
  505. local Joints = {
  506. Character.Torso:FindFirstChild("Right Shoulder"),
  507. Character.Torso:FindFirstChild("Left Shoulder"),
  508. Character.Torso:FindFirstChild("Right Hip"),
  509. Character.Torso:FindFirstChild("Left Hip")
  510. }
  511. local Limbs = {
  512. Character:FindFirstChild("Right Arm"),
  513. Character:FindFirstChild("Left Arm"),
  514. Character:FindFirstChild("Right Leg"),
  515. Character:FindFirstChild("Left Leg")
  516. }
  517. if Joints[Limb] == nil then return false end
  518. if Limbs[Limb] == nil then return false end
  519. local Joint = Instance.new("Motor")
  520. Joint.Parent = Character.Torso
  521. Joint.Part0 = Character.Torso
  522. Joint.Part1 = Limbs[Limb]
  523. if Limb == 1 then
  524. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  525. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  526. Joint.Name = "Right Shoulder 2"
  527. elseif Limb == 2 then
  528. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  529. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  530. Joint.Name = "Left Shoulder 2"
  531. elseif Limb == 3 then
  532. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  533. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  534. Joint.Name = "Right Hip 2"
  535. elseif Limb == 4 then
  536. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  537. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  538. Joint.Name = "Left Hip 2"
  539. end
  540. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  541. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  542. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  543. Joints[Limb]:Remove()
  544. end
  545.  
  546.  
  547. function ResetLimbCFrame(Limb, Character)
  548. if Character == nil then return false end
  549. if Character.Parent == nil then return false end
  550. if Character:FindFirstChild("Torso") == nil then return false end
  551. local Joints = {
  552. Character.Torso:FindFirstChild("Right Shoulder 2"),
  553. Character.Torso:FindFirstChild("Left Shoulder 2"),
  554. Character.Torso:FindFirstChild("Right Hip 2"),
  555. Character.Torso:FindFirstChild("Left Hip 2")
  556. }
  557. local Limbs = {
  558. Character:FindFirstChild("Right Arm"),
  559. Character:FindFirstChild("Left Arm"),
  560. Character:FindFirstChild("Right Leg"),
  561. Character:FindFirstChild("Left Leg")
  562. }
  563. if Joints[Limb] == nil then return false end
  564. if Limbs[Limb] == nil then return false end
  565. if Limb == 1 then
  566. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  567. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  568. elseif Limb == 2 then
  569. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  570. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  571. elseif Limb == 3 then
  572. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  573. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  574. elseif Limb == 4 then
  575. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  576. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  577. end
  578. end
  579.  
  580.  
  581. function EnableLimb(Limb, Character)
  582. if Character == nil then return false end
  583. if Character:FindFirstChild("Torso") == nil then return false end
  584. local Joints = {
  585. Character.Torso:FindFirstChild("Right Shoulder 2"),
  586. Character.Torso:FindFirstChild("Left Shoulder 2"),
  587. Character.Torso:FindFirstChild("Right Hip 2"),
  588. Character.Torso:FindFirstChild("Left Hip 2")
  589. }
  590. local Limbs = {
  591. Character:FindFirstChild("Right Arm"),
  592. Character:FindFirstChild("Left Arm"),
  593. Character:FindFirstChild("Right Leg"),
  594. Character:FindFirstChild("Left Leg")
  595. }
  596. if Joints[Limb] == nil then return false end
  597. if Limbs[Limb] == nil then return false end
  598. if Limb == 1 then
  599. Joints[Limb].Name = "Right Shoulder"
  600. elseif Limb == 2 then
  601. Joints[Limb].Name = "Left Shoulder"
  602. elseif Limb == 3 then
  603. Joints[Limb].Name = "Right Hip"
  604. elseif Limb == 4 then
  605. Joints[Limb].Name = "Left Hip"
  606. end
  607. Animate = Character:FindFirstChild("Animate")
  608. if Animate == nil then return false end
  609. Animate = Animate:Clone()
  610. Character.Animate:Remove()
  611. Animate.Parent = Character
  612. end
  613.  
  614.  
  615. function Weld(x, y)
  616. local weld = Instance.new("Weld")
  617. weld.Part0 = x
  618. weld.Part1 = y
  619. CJ = CFrame.new(x.Position)
  620. C0 = x.CFrame:inverse() * CJ
  621. C1 = y.CFrame:inverse() * CJ
  622. weld.C0 = C0
  623. weld.C1 = C1
  624. weld.Parent = x
  625. end
  626.  
  627.  
  628. function tagHumanoid(humanoid)
  629. local tag = Instance.new("ObjectValue")
  630. tag.Name = "creator"
  631. tag.Value = Player
  632. tag.Parent = humanoid
  633. local tag = Instance.new("StringValue")
  634. tag.Name = "creatorType1"
  635. tag.Value = Name
  636. tag.Parent = humanoid
  637. local tag = Instance.new("StringValue")
  638. tag.Name = "creatorType2"
  639. tag.Value = "killed with magic"
  640. tag.Parent = humanoid
  641. end
  642.  
  643.  
  644. function untagHumanoid(humanoid)
  645. if humanoid ~= nil then
  646. local tag = humanoid:FindFirstChild("creator")
  647. if tag ~= nil then
  648. tag:Remove()
  649. end
  650. local tag = humanoid:FindFirstChild("creatorType1")
  651. if tag ~= nil then
  652. tag:Remove()
  653. end
  654. local tag = humanoid:FindFirstChild("creatorType2")
  655. if tag ~= nil then
  656. tag:Remove()
  657. end
  658. end
  659. end
  660.  
  661.  
  662. function onButton1Down(mouse)
  663. if selected == false or canFire == false or power <= 0 then return end
  664. if Player.Character == nil then return end
  665. if Player.Character:FindFirstChild("Humanoid") == nil then return end
  666. if Player.Character.Humanoid.Health <= 0 then return end
  667. if Player.Character:FindFirstChild(Name) == nil then return end
  668. if Player.Character[Name]:FindFirstChild("Handle") == nil then return end
  669. if Player.Character[Name]:FindFirstChild("Source") == nil then return end
  670. if mouse == nil then return end
  671. Button1Down = true
  672. if spell == 1 then
  673. --Arefu Slash, projectile class. Uses hardened air particles to create razor-sharp projectiles.
  674. canFire = false
  675. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  676. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  677. Player.Character[Name].Source.Transparency = 0.25
  678. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright green")
  679. Player.Character[Name].Source.Fire.Enabled = true
  680. Player.Character[Name].Source.Fire.Heat = math.random(5, 10)
  681. Player.Character[Name].Source.Fire.Size = math.random(5, 10)
  682. Player.Character[Name].Source.Fire.Color = Color3.new(0, 1, 0)
  683. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  684. while Button1Down == true do
  685. if power <= 0 then break end
  686. coroutine.resume(coroutine.create(function()
  687. for i = 0, 1, 0.1 do
  688. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5) + Vector3.new(1, 1, 1)
  689. Player.Character[Name].Source.Transparency = i
  690. wait()
  691. end
  692. Player.Character[Name].Source.Transparency = 1
  693. Player.Character[Name].Source.Fire.Enabled = false
  694. end))
  695. Player.Character[Name].Handle.Fire2.Looped = false
  696. Player.Character[Name].Handle.Fire2.Volume = 1
  697. Player.Character[Name].Handle.Fire2.Pitch = 1
  698. Player.Character[Name].Handle.Fire2:Play()
  699. power = power - 1
  700. local air = Instance.new("Part")
  701. air.Name = "Air"
  702. air.FormFactor = "Custom"
  703. air.Size = Vector3.new(1, 1, 2)
  704. air.TopSurface = "Smooth"
  705. air.BottomSurface = "Smooth"
  706. air.BrickColor = BrickColor.new("Institutional white")
  707. air.CanCollide = false
  708. air.Anchored = true
  709. air.Transparency = math.random(0, 5) / 10
  710. air.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(math.random(-100, 100), math.random(-100, 100), math.random(-100, 100)), mouse.Hit.p)
  711. air.Parent = Workspace
  712. air:BreakJoints()
  713. local m = Instance.new("SpecialMesh")
  714. m.MeshType = "Sphere"
  715. m.Scale = Vector3.new(0.5, 0.5, 1)
  716. m.Parent = air
  717. coroutine.resume(coroutine.create(function()
  718. while air.Parent ~= nil do
  719. air.CFrame = CFrame.new(air.Position + (air.CFrame.lookVector * 5)) * CFrame.fromEulerAnglesXYZ(air.CFrame:toEulerAnglesXYZ())
  720. for _, model in pairs(Workspace:GetChildren()) do
  721. if model.ClassName == "Part" then
  722. if (air.Position - model.Position).magnitude <= 5 and model.Anchored == false then
  723. model.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  724. if math.random(1, 10) == 1 then model:BreakJoints() end
  725. air:Remove()
  726. return
  727. end
  728. elseif model.ClassName == "Model" and model ~= Player.Character then
  729. for _, x in pairs(model:GetChildren()) do
  730. if x.ClassName == "Part" then
  731. if (air.Position - x.Position).magnitude <= 5 and x.Anchored == false then
  732. x.Velocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  733. if math.random(1, 10) == 1 then x:BreakJoints() end
  734. if model:FindFirstChild("Humanoid") ~= nil then
  735. model.Humanoid:TakeDamage(5)
  736. model.Humanoid.Sit = true
  737. end
  738. air:Remove()
  739. return
  740. end
  741. end
  742. end
  743. end
  744. end
  745. local shock = Instance.new("Part")
  746. shock.FormFactor = "Custom"
  747. shock.Size = Vector3.new(1, 1, 1)
  748. shock.BrickColor = BrickColor.new("Institutional white")
  749. shock.Anchored = true
  750. shock.Name = "Shock Ring"
  751. shock.CanCollide = false
  752. shock.Parent = Workspace
  753. local mesh = Instance.new("SpecialMesh")
  754. mesh.MeshType = "FileMesh"
  755. mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
  756. mesh.Scale = Vector3.new(1, 1, 1)
  757. mesh.Parent = shock
  758. shock.CFrame = CFrame.new(air.Position + (air.CFrame.lookVector * 10), air.Position + (air.CFrame.lookVector * 50)) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  759. coroutine.resume(coroutine.create(function()
  760. for i = 0, 10 do
  761. shock.Mesh.Scale = Vector3.new(i / 5, i, i / 5)
  762. shock.Transparency = i / 10
  763. wait()
  764. end
  765. shock:Remove()
  766. end))
  767. wait()
  768. end
  769. end))
  770. coroutine.resume(coroutine.create(function(part)
  771. wait(10)
  772. part:Remove()
  773. end), air)
  774. wait()
  775. end
  776. canFire = true
  777. elseif spell == 2 then
  778. --Arefu Metoria, projectile class. Uses meteors.
  779. local position, target = mouse.Hit.p, mouse.Target
  780. if target == nil then return end
  781. if target.Parent == nil then return end
  782. canFire = false
  783. power = power - 50
  784. local offset = position - target.Position
  785. local size = math.random(10, 30)
  786. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  787. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  788. Player.Character[Name].Source.Transparency = 0
  789. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright green")
  790. Player.Character[Name].Handle.Charge2.Looped = false
  791. Player.Character[Name].Handle.Charge2.Volume = 1
  792. Player.Character[Name].Handle.Charge2.Pitch = 0.35
  793. Player.Character[Name].Handle.Charge2:Play()
  794. local beam = Instance.new("Part")
  795. beam.BrickColor = BrickColor.new("Bright green")
  796. beam.TopSurface = 0
  797. beam.BottomSurface = 0
  798. beam.Size = Vector3.new(1, 1, 1)
  799. beam.Transparency = 0.5
  800. beam.Anchored = true
  801. beam.CanCollide = false
  802. beam.CFrame = CFrame.new(position)
  803. beam.Parent = Workspace
  804. local mesh = Instance.new("CylinderMesh")
  805. mesh.Parent = beam
  806. for i = 0, 60, 1 do
  807. local shine = Instance.new("Part")
  808. shine.Name = "Shine"
  809. shine.FormFactor = "Custom"
  810. shine.Shape = "Ball"
  811. shine.CanCollide = false
  812. shine.BrickColor = BrickColor.new("Bright green")
  813. shine.TopSurface = 0
  814. shine.BottomSurface = 0
  815. shine.Size = Vector3.new(1, 1, 1)
  816. shine.Transparency = 0.25
  817. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
  818. shine.Parent = Workspace
  819. local force = Instance.new("BodyPosition")
  820. force.D = 7000
  821. force.P = 100000
  822. force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  823. force.position = Player.Character[Name].Source.Position
  824. force.Parent = shine
  825. coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
  826. mesh.Scale = Vector3.new(size * (i / 60), 10000, size * (i / 60))
  827. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 10, i / 10, i / 10)
  828. Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency - 0.015
  829. wait()
  830. end
  831. for i = 0, 10 do
  832. beam.Transparency = beam.Transparency + 0.1
  833. Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency + 0.1
  834. wait()
  835. end
  836. if beam ~= nil then beam:Remove() end
  837. Player.Character[Name].Source.Transparency = 1
  838. canFire = true
  839. local meteor = Instance.new("Part")
  840. meteor.BrickColor = BrickColor.new("Bright red")
  841. meteor.Name = "Meteor"
  842. meteor.CanCollide = true
  843. meteor.Locked = true
  844. meteor.FormFactor = "Custom"
  845. meteor.Shape = "Ball"
  846. meteor.Size = Vector3.new(size, size, size)
  847. meteor.RotVelocity = Vector3.new(math.random(-1000, 1000), math.random(-1000, 1000), math.random(-1000, 1000))
  848. meteor.Parent = Workspace
  849. meteor:BreakJoints()
  850. local fire = Instance.new("Fire")
  851. fire.Heat = 0
  852. fire.Size = 50
  853. fire.Parent = meteor
  854. local smoke = Instance.new("Smoke")
  855. smoke.RiseVelocity = 0
  856. smoke.Size = size + 3
  857. smoke.Color = Color3.new(50 / 255, 50 / 255, 50 / 255)
  858. smoke.Opacity = 0.5
  859. smoke.Parent = meteor
  860. local mesh = Instance.new("SpecialMesh")
  861. mesh.MeshType = "FileMesh"
  862. mesh.MeshId = "http://www.roblox.com/Asset/?id=1290033"
  863. mesh.TextureId = "http://www.roblox.com/Asset/?id=1290030"
  864. mesh.Scale = meteor.Size / 1.5
  865. mesh.VertexColor = Vector3.new(1, 0, 0)
  866. mesh.Parent = meteor
  867. for i = 5000, 0, -100 do
  868. meteor.CFrame = CFrame.new((target.Position + offset) + Vector3.new(0, i, 0))
  869. meteor.Velocity = Vector3.new(0, 0, 0)
  870. wait()
  871. end
  872. meteor.CFrame = CFrame.new((target.Position + offset) + Vector3.new(0, size / 2, 0))
  873. delay(0.1, function() Weld(target, meteor) meteor.Velocity = Vector3.new(0, 0, 0) end)
  874. meteor.Anchored = true
  875. local s = Instance.new("Sound")
  876. s.SoundId = "rbxasset://sounds\\Launching rocket.wav"
  877. s.Pitch = (30 - size) / 25
  878. s.Parent = Workspace
  879. s:Play()
  880. local shards = {}
  881. for i = 0, math.random(10, 30) do
  882. local shard = Instance.new("Part")
  883. shard.Name = "Ground Shard"
  884. shard.Anchored = true
  885. shard.Locked = true
  886. shard.BrickColor = target.BrickColor
  887. shard.Size = Vector3.new(size + 10, 2, size)
  888. shard.CFrame = CFrame.new(meteor.Position - Vector3.new(0, size / 2, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(0), math.rad(math.random(0, 360)), math.rad(math.random(0, 25)))
  889. shard.Parent = Workspace
  890. table.insert(shards, shard)
  891. end
  892. local new = Instance.new("Part")
  893. new.Name = "Meteor"
  894. new.Transparency = 1
  895. new.CanCollide = false
  896. new.Anchored = true
  897. new.CFrame = CFrame.new(meteor.Position)
  898. new.Parent = Workspace
  899. local fire = Instance.new("Fire")
  900. fire.Heat = 50
  901. fire.Size = 50
  902. fire.Parent = new
  903. meteor.Fire:Remove()
  904. local shock = Instance.new("Part")
  905. shock.FormFactor = "Custom"
  906. shock.Size = Vector3.new(1, 1, 1)
  907. shock.BrickColor = BrickColor.new("Institutional white")
  908. shock.Anchored = true
  909. shock.Name = "Shock Ring"
  910. shock.CanCollide = false
  911. shock.Parent = Workspace
  912. local mesh = Instance.new("SpecialMesh")
  913. mesh.MeshType = "FileMesh"
  914. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  915. mesh.Parent = shock
  916. local tilt1 = math.random(-10, 10)
  917. local tilt2 = math.random(-10, 10)
  918. local tiltChance = math.random(1, 3)
  919. for i = 0, 50 do
  920. shock.Mesh.Scale = Vector3.new(i, i, i)
  921. if tiltChance == 1 then
  922. shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), 0, 0)
  923. elseif tiltChance == 2 then
  924. shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2), 0)
  925. elseif tiltChance == 3 then
  926. shock.CFrame = CFrame.new(meteor.Position - Vector3.new(0, meteor.Size.y / 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), math.rad(tilt2), 0)
  927. end
  928. wait()
  929. end
  930. for i = 0, 1, 0.1 do
  931. shock.Transparency = i
  932. wait()
  933. end
  934. shock:Remove()
  935. wait(math.random(1, 10))
  936. if new ~= nil then new:Remove() end
  937. if meteor == nil then return end
  938. local e = Instance.new("Explosion")
  939. e.BlastPressure = 100000
  940. e.Position = meteor.Position
  941. e.BlastRadius = meteor.Size.y * 2
  942. e.Parent = Workspace
  943. local s = Instance.new("Sound")
  944. s.Name = "Explosion"
  945. s.Pitch = (30 - size) / 20
  946. s.SoundId = "http://www.roblox.com/Asset/?id=2101148"
  947. s.Parent = Workspace
  948. s:Play()
  949. for i = 0, math.random(2, 10) do
  950. local size = math.random(1, 5)
  951. local new = meteor:Clone()
  952. if new:FindFirstChild("Weld") ~= nil then new.Weld:Remove() end
  953. new.Size = Vector3.new(size, size, size)
  954. new.Mesh.Scale = Vector3.new(size, size, size)
  955. new.CanCollide = false
  956. new.Anchored = false
  957. new.CFrame = CFrame.new(meteor.Position + Vector3.new(math.random(-meteor.Size.x / 2, meteor.Size.x / 2), math.random(-meteor.Size.y / 2, meteor.Size.y / 2), math.random(-meteor.Size.z / 2, meteor.Size.z / 2))) * CFrame.fromEulerAnglesXYZ(math.random(0, 360), math.random(0, 360), math.random(0, 360))
  958. new.Velocity = Vector3.new(math.random(-100, 100), math.random(10, 250), math.random(-100, 100))
  959. new.RotVelocity = Vector3.new(math.random(-500, 500), math.random(-500, 500), math.random(-500, 500))
  960. new.Smoke:Remove()
  961. new.Parent = Workspace
  962. end
  963. for i = 1, #shards do
  964. if shards[i] ~= nil then
  965. if math.random(1, 2) == 1 then
  966. shards[i]:Remove()
  967. else
  968. shards[i].CanCollide = false
  969. shards[i].Anchored = false
  970. shards[i].RotVelocity = Vector3.new(math.random(-500, 500), math.random(-500, 500), math.random(-500, 500))
  971. shards[i].Velocity = Vector3.new(math.random(-100, 100), math.random(10, 250), math.random(-100, 100))
  972. end
  973. end
  974. end
  975. meteor:Remove()
  976. elseif spell == 3 then
  977. --Eccrando Bolt, energy class. Fires a charged bolt of energy gathered in your wand.
  978. canFire = false
  979. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  980. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  981. Player.Character[Name].Source.Transparency = 0
  982. Player.Character[Name].Source.BrickColor = BrickColor.new("New Yeller")
  983. Player.Character[Name].Handle.Charge1.Looped = false
  984. Player.Character[Name].Handle.Charge1.Volume = 1
  985. Player.Character[Name].Handle.Charge1.Pitch = 1
  986. Player.Character[Name].Handle.Charge1:Play()
  987. for i = 0, 10 do
  988. local shine = Instance.new("Part")
  989. shine.Name = "Shine"
  990. shine.FormFactor = "Custom"
  991. shine.Shape = "Ball"
  992. shine.CanCollide = false
  993. shine.BrickColor = BrickColor.new("New Yeller")
  994. shine.TopSurface = 0
  995. shine.BottomSurface = 0
  996. shine.Size = Vector3.new(1, 1, 1)
  997. shine.Transparency = 0.25
  998. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
  999. shine.Parent = Workspace
  1000. local force = Instance.new("BodyPosition")
  1001. force.D = 7000
  1002. force.P = 100000
  1003. force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1004. force.position = Player.Character[Name].Source.Position
  1005. force.Parent = shine
  1006. coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
  1007. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
  1008. wait()
  1009. power = power - 1
  1010. end
  1011. for i = 10, 20 do
  1012. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
  1013. power = power - 1
  1014. wait()
  1015. end
  1016. local first = true
  1017. while Button1Down == true or first == true do
  1018. first = false
  1019. if power < 0 then break end
  1020. power = power - 5
  1021. if Player.Character == nil then break end
  1022. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1023. if Player.Character.Humanoid.Health <= 0 then break end
  1024. if Player.Character:FindFirstChild(Name) == nil then break end
  1025. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1026. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1027. if selected == false then break end
  1028. Player.Character[Name].Handle.Fire1.Looped = false
  1029. Player.Character[Name].Handle.Fire1.Volume = 1
  1030. Player.Character[Name].Handle.Fire1.Pitch = 1
  1031. Player.Character[Name].Handle.Fire1:Play()
  1032. local position = mouse.Hit.p
  1033. local e = Instance.new("Explosion")
  1034. e.BlastPressure = 500000
  1035. e.BlastRadius = 10
  1036. e.Position = position
  1037. e.Parent = Workspace
  1038. for i = 1, math.random(5, 25) do
  1039. local shine = Instance.new("Part")
  1040. shine.Name = "Shine"
  1041. shine.FormFactor = "Custom"
  1042. shine.Shape = "Block"
  1043. shine.CanCollide = false
  1044. shine.Anchored = true
  1045. shine.BrickColor = BrickColor.new("New Yeller")
  1046. shine.TopSurface = 0
  1047. shine.BottomSurface = 0
  1048. shine.Size = Vector3.new(1, 1, 1)
  1049. shine.Transparency = 0.25
  1050. shine.CFrame = CFrame.new(mouse.Hit.p)
  1051. shine.Parent = Workspace
  1052. local mesh = Instance.new("SpecialMesh")
  1053. mesh.MeshType = "Brick"
  1054. local random = math.random(3, 10) / 10
  1055. mesh.Scale = Vector3.new(random, random, random)
  1056. mesh.Parent = shine
  1057. coroutine.resume(coroutine.create(function(part)
  1058. for i = 0.25 * 25, 25 do
  1059. part.Transparency = i / 25
  1060. part.CFrame = CFrame.new(part.Position + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1061. wait(math.random(1, 5) / 100)
  1062. end
  1063. part:Remove()
  1064. end), shine)
  1065. end
  1066. for i = 1, math.random(2, 5) do
  1067. local shine = Instance.new("Part")
  1068. shine.Name = "Shine"
  1069. shine.FormFactor = "Custom"
  1070. shine.Shape = "Block"
  1071. shine.CanCollide = false
  1072. shine.Anchored = true
  1073. shine.BrickColor = BrickColor.new("New Yeller")
  1074. shine.TopSurface = 0
  1075. shine.BottomSurface = 0
  1076. shine.Size = Vector3.new(1, 1, 1)
  1077. shine.Transparency = 0.25
  1078. shine.CFrame = CFrame.new(mouse.Hit.p + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10))
  1079. shine.Parent = Workspace
  1080. local mesh = Instance.new("SpecialMesh")
  1081. mesh.MeshType = "Sphere"
  1082. local random = math.random(3, 10) / 10
  1083. mesh.Scale = Vector3.new(random, random, random)
  1084. mesh.Parent = shine
  1085. coroutine.resume(coroutine.create(function(part)
  1086. for i = 0.25, 1, 0.05 do
  1087. part.Transparency = i
  1088. part.Mesh.Scale = part.Mesh.Scale + Vector3.new(1, 1, 1)
  1089. wait()
  1090. end
  1091. part:Remove()
  1092. end), shine)
  1093. end
  1094. local trail = Instance.new("Part")
  1095. trail.BrickColor = BrickColor.new("New Yeller")
  1096. trail.TopSurface = 0
  1097. trail.BottomSurface = 0
  1098. trail.Size = Vector3.new(1, 1, 1)
  1099. trail.Transparency = 0.4
  1100. trail.Anchored = true
  1101. trail.CanCollide = false
  1102. trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + position) / 2, position)
  1103. trail.Parent = Workspace
  1104. local mesh = Instance.new("SpecialMesh")
  1105. mesh.MeshType = "Brick"
  1106. mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (position - Player.Character[Name].Source.Position).magnitude)
  1107. mesh.Parent = trail
  1108. coroutine.resume(coroutine.create(function(part) wait(0.1) for i = 1, 10 do part.Transparency = part.Transparency + 0.1 wait(0.1) end part:Remove() end), trail)
  1109. coroutine.resume(coroutine.create(function()
  1110. for i = 10, 0, -1 do
  1111. Player.Character[Name].Source.Transparency = (10 - i) / 10
  1112. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 1.5, i / 1.5, i / 1.5)
  1113. wait()
  1114. end
  1115. end))
  1116. wait(0.3)
  1117. end
  1118. Player.Character[Name].Source.Transparency = 1
  1119. canFire = true
  1120. elseif spell == 4 then
  1121. --Eccrando Strike, energy class. Use the clouds to your advantage and fire bolts of lightning at the ground.
  1122. while Button1Down == true do
  1123. if Player.Character == nil then break end
  1124. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1125. if Player.Character.Humanoid.Health <= 0 then break end
  1126. if Player.Character:FindFirstChild(Name) == nil then break end
  1127. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1128. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1129. if selected == false then break end
  1130. while power <= 25 and Button1Down == true do
  1131. wait()
  1132. end
  1133. if power <= 0 then break end
  1134. canFire = false
  1135. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1136. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1137. Player.Character[Name].Source.Transparency = 0
  1138. Player.Character[Name].Source.BrickColor = BrickColor.new("New Yeller")
  1139. Player.Character[Name].Handle.Charge1.Looped = false
  1140. Player.Character[Name].Handle.Charge1.Volume = 1
  1141. Player.Character[Name].Handle.Charge1.Pitch = 0.4
  1142. Player.Character[Name].Handle.Charge1:Play()
  1143. for i = 0, 50 do
  1144. local shine = Instance.new("Part")
  1145. shine.Name = "Shine"
  1146. shine.FormFactor = "Custom"
  1147. shine.Shape = "Ball"
  1148. shine.CanCollide = false
  1149. shine.BrickColor = BrickColor.new("New Yeller")
  1150. shine.TopSurface = 0
  1151. shine.BottomSurface = 0
  1152. shine.Size = Vector3.new(1, 1, 1)
  1153. shine.Transparency = 0.25
  1154. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position + Vector3.new(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)))
  1155. shine.Parent = Workspace
  1156. local force = Instance.new("BodyPosition")
  1157. force.D = 7000
  1158. force.P = 100000
  1159. force.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1160. force.position = Player.Character[Name].Source.Position
  1161. force.Parent = shine
  1162. coroutine.resume(coroutine.create(function(part1, part2) for i = 0, 10 do if part1 ~= nil and part2 ~= nil then part1.BodyPosition.position = part2.Position wait() end end part1:Remove() end), shine, Player.Character[Name].Source)
  1163. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 7.5, i / 7.5, i / 7.5)
  1164. power = power - 1
  1165. wait()
  1166. end
  1167. power = power - 10
  1168. if math.random(1, 2) == 1 then id = "Thunder" else id = "Lightning" end
  1169. local s = Instance.new("Sound")
  1170. s.Volume = math.random(10, 50) / 10
  1171. s.SoundId = "rbxasset://sounds\\Halloween" ..id.. ".wav"
  1172. s.Pitch = math.random(9, 11) / 10
  1173. s.Parent = Workspace
  1174. s:Play()
  1175. if math.random(1, 2) == 1 then id = "Thunder" else id = "Lightning" end
  1176. local s = Instance.new("Sound")
  1177. s.Volume = math.random(1, 10) / 10
  1178. s.SoundId = "rbxasset://sounds\\Halloween" ..id.. ".wav"
  1179. s.Pitch = math.random(1, 30) / 10
  1180. s.Parent = Workspace
  1181. s:Play()
  1182. if selected == false then break end
  1183. local e = Instance.new("Explosion")
  1184. e.BlastPressure = 1000000
  1185. e.BlastRadius = 25
  1186. e.Position = mouse.Hit.p
  1187. e.Parent = Workspace
  1188. local pos = (mouse.Hit.p + Vector3.new(math.random(-100, 100), 1000, math.random(-100, 100)))
  1189. local trail = Instance.new("Part")
  1190. trail.BrickColor = BrickColor.new("New Yeller")
  1191. trail.TopSurface = 0
  1192. trail.BottomSurface = 0
  1193. trail.Size = Vector3.new(1, 1, 1)
  1194. trail.Transparency = 0.4
  1195. trail.Anchored = true
  1196. trail.CanCollide = false
  1197. trail.CFrame = CFrame.new((pos + mouse.Hit.p) / 2, mouse.Hit.p)
  1198. trail.Parent = Workspace
  1199. local mesh = Instance.new("SpecialMesh")
  1200. mesh.MeshType = "Brick"
  1201. mesh.Scale = Vector3.new(math.random(40, 50) / 10, math.random(40, 50) / 10, (mouse.Hit.p - pos).magnitude + 10)
  1202. mesh.Parent = trail
  1203. coroutine.resume(coroutine.create(function(part) wait(0.1) for i = 1, 10 do part.Transparency = part.Transparency + 0.1 wait(0.1) end part:Remove() end), trail)
  1204. for i = 10, 0, -1 do
  1205. Player.Character[Name].Source.Transparency = Player.Character[Name].Source.Transparency + 0.1
  1206. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i / 1.5, i / 1.5, i / 1.5)
  1207. wait()
  1208. end
  1209. Player.Character[Name].Source.Transparency = 1
  1210. wait(0.1)
  1211. canFire = true
  1212. end
  1213. elseif spell == 5 then
  1214. --Thius Dae, health-based class. Seep life from your enemies to save yourself. Works as a general defense against multiple enemies.
  1215. canFire = false
  1216. Player.Character[Name].Source.Mesh.MeshType = "Brick"
  1217. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1218. Player.Character[Name].Source.Transparency = 0.25
  1219. Player.Character[Name].Source.BrickColor = BrickColor.new("Really black")
  1220. Player.Character[Name].Handle.Charge4.Looped = true
  1221. Player.Character[Name].Handle.Charge4.Volume = 1
  1222. Player.Character[Name].Handle.Charge4.Pitch = 1
  1223. Player.Character[Name].Handle.Charge4:Play()
  1224. for i = 0, 10 do
  1225. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale * 1.11
  1226. Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1227. wait()
  1228. end
  1229. for i = 0, math.huge, 0.1 do
  1230. if Button1Down == false then break end
  1231. if Player.Character == nil then break end
  1232. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1233. if Player.Character.Humanoid.Health <= 0 then break end
  1234. if Player.Character:FindFirstChild(Name) == nil then break end
  1235. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1236. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1237. if power <= 0 then break end
  1238. local endstr = string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i)))
  1239. if endstr == "0" or endstr == "2" or endstr == "4" or endstr == "6" or endstr == "8" then
  1240. power = power - 1
  1241. end
  1242. Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1243. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i) + 3, math.sin(i) + 3, math.sin(i) + 3)
  1244. local shine = Instance.new("Part")
  1245. shine.Name = "Shine"
  1246. shine.FormFactor = "Custom"
  1247. shine.Shape = "Block"
  1248. shine.CanCollide = false
  1249. shine.Anchored = true
  1250. shine.BrickColor = BrickColor.new("Really black")
  1251. shine.TopSurface = 0
  1252. shine.BottomSurface = 0
  1253. shine.Size = Vector3.new(1, 1, 1)
  1254. shine.Transparency = 0.25
  1255. shine.CFrame = CFrame.new(Player.Character[Name].Source.Position)
  1256. shine.Parent = Workspace
  1257. local mesh = Instance.new("SpecialMesh")
  1258. mesh.MeshType = "Brick"
  1259. local random = math.random(3, 10) / 10
  1260. mesh.Scale = Vector3.new(random, random, random)
  1261. mesh.Parent = shine
  1262. coroutine.resume(coroutine.create(function(part)
  1263. for i = 0.25 * 25, 25 do
  1264. part.Transparency = i / 25
  1265. part.CFrame = CFrame.new(part.Position + Vector3.new(math.random(-10, 10) / 10, math.random(-10, 10) / 10, math.random(-10, 10) / 10)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1266. wait(math.random(1, 5) / 100)
  1267. end
  1268. part:Remove()
  1269. end), shine)
  1270. for _, model in pairs(Workspace:GetChildren()) do
  1271. if model ~= Player.Character then
  1272. if model:FindFirstChild("Torso") ~= nil and model:FindFirstChild("Humanoid") ~= nil then
  1273. if (Player.Character.Torso.Position - model.Torso.Position).magnitude <= 25 then
  1274. local trail = Instance.new("Part")
  1275. trail.BrickColor = BrickColor.new("Really black")
  1276. trail.TopSurface = 0
  1277. trail.BottomSurface = 0
  1278. trail.Size = Vector3.new(1, 1, 1)
  1279. trail.Transparency = 0.4
  1280. trail.Anchored = true
  1281. trail.CanCollide = false
  1282. trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + model.Torso.Position) / 2, model.Torso.Position)
  1283. trail.Parent = Workspace
  1284. local mesh = Instance.new("SpecialMesh")
  1285. mesh.MeshType = "Brick"
  1286. mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (model.Torso.Position - Player.Character[Name].Source.Position).magnitude)
  1287. mesh.Parent = trail
  1288. coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), trail)
  1289. if model.Humanoid.Health > 0 then
  1290. model.Humanoid:TakeDamage(1.25)
  1291. Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + (1.25 / 2)
  1292. elseif model.Humanoid.Health <= 0 then
  1293. model.Humanoid.Health = 0
  1294. model.Humanoid.Name = "HumanoidAbsorbed"
  1295. for _, part in pairs(model:GetChildren()) do
  1296. if part.ClassName == "Part" then
  1297. local position = Instance.new("BodyPosition")
  1298. position.Name = "Thius Dae"
  1299. position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1300. position.P = 1000
  1301. position.D = 50
  1302. position.Parent = part
  1303. position.position = Player.Character[Name].Source.Position
  1304. coroutine.resume(coroutine.create(function() while position.Parent ~= nil do position.position = Player.Character[Name].Source.Position part.CanCollide = false wait() end end))
  1305. coroutine.resume(coroutine.create(function() wait(3.5) position:Remove() end))
  1306. end
  1307. end
  1308. Player.Character.Humanoid.Health = Player.Character.Humanoid.Health + 5
  1309. power = power + 25
  1310. Player.Character[Name].Handle.Fire4.Looped = false
  1311. Player.Character[Name].Handle.Fire4.Volume = 1
  1312. Player.Character[Name].Handle.Fire4.Pitch = 1
  1313. Player.Character[Name].Handle.Fire4:Play()
  1314. end
  1315. end
  1316. end
  1317. end
  1318. end
  1319. wait()
  1320. end
  1321. for i = 0, 25 do
  1322. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale / 1.15
  1323. Player.Character[Name].Source.Weld.C0 = CFrame.fromEulerAnglesXYZ(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))
  1324. Player.Character[Name].Handle.Charge4.Volume = (25 - i) / 25
  1325. wait()
  1326. end
  1327. Player.Character[Name].Handle.Charge4:Stop()
  1328. Player.Character[Name].Source.Transparency = 1
  1329. Player.Character[Name].Source.Weld.C0 = CFrame.new()
  1330. canFire = true
  1331. elseif spell == 6 then
  1332. --Thius Heed, health-based class. Heal people around you and sheild them.
  1333. canFire = false
  1334. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1335. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1336. Player.Character[Name].Source.Transparency = 0.25
  1337. Player.Character[Name].Source.BrickColor = BrickColor.new("Institutional white")
  1338. Player.Character[Name].Source.Fire.Enabled = true
  1339. Player.Character[Name].Source.Fire.Heat = 10
  1340. Player.Character[Name].Source.Fire.Size = 1
  1341. Player.Character[Name].Source.Fire.Color = Color3.new(1, 1, 1)
  1342. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1343. Player.Character[Name].Handle.Shine.Looped = true
  1344. Player.Character[Name].Handle.Shine.Volume = 1
  1345. Player.Character[Name].Handle.Shine.Pitch = 1
  1346. Player.Character[Name].Handle.Shine:Play()
  1347. for i = 0, 5 do
  1348. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale * 1.2
  1349. Player.Character[Name].Source.Fire.Size = Player.Character[Name].Source.Fire.Size * 1.2
  1350. wait()
  1351. end
  1352. local heed = Instance.new("ForceField")
  1353. heed.Name = "HeedShield"
  1354. for i = 0, math.huge, 0.1 do
  1355. if Button1Down == false then break end
  1356. if Player.Character == nil then break end
  1357. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1358. if Player.Character.Humanoid.Health <= 0 then break end
  1359. if Player.Character:FindFirstChild(Name) == nil then break end
  1360. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1361. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1362. if power <= 0 then break end
  1363. local endstr = string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i)))
  1364. if endstr == "0" or endstr == "2" or endstr == "4" or endstr == "6" or endstr == "8" then
  1365. power = power - 1
  1366. end
  1367. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i) + 3, math.sin(i) + 3, math.sin(i) + 3)
  1368. Player.Character[Name].Source.Fire.Size = math.sin(i) + 10
  1369. Player.Character[Name].Source.Fire.Heat = math.sin(i) + 10
  1370. for _, model in pairs(Workspace:GetChildren()) do
  1371. if model:FindFirstChild("Torso") ~= nil and model:FindFirstChild("Humanoid") ~= nil then
  1372. if (Player.Character.Torso.Position - model.Torso.Position).magnitude <= 25 then
  1373. local trail = Instance.new("Part")
  1374. trail.BrickColor = BrickColor.new("Institutional white")
  1375. trail.TopSurface = 0
  1376. trail.BottomSurface = 0
  1377. trail.Size = Vector3.new(1, 1, 1)
  1378. trail.Transparency = 0.4
  1379. trail.Anchored = true
  1380. trail.CanCollide = false
  1381. trail.CFrame = CFrame.new((Player.Character[Name].Source.Position + model.Torso.Position) / 2, model.Torso.Position)
  1382. trail.Parent = Workspace
  1383. local mesh = Instance.new("SpecialMesh")
  1384. mesh.MeshType = "Brick"
  1385. mesh.Scale = Vector3.new(math.random(2, 5) / 10, math.random(2, 5) / 10, (model.Torso.Position - Player.Character[Name].Source.Position).magnitude)
  1386. mesh.Parent = trail
  1387. coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), trail)
  1388. model.Humanoid.Health = model.Humanoid.Health + 1.25
  1389. heed:Clone().Parent = model
  1390. coroutine.resume(coroutine.create(function(part) wait() part:Remove() end), model.HeedShield)
  1391. end
  1392. end
  1393. end
  1394. wait()
  1395. end
  1396. for i = 0, 25 do
  1397. Player.Character[Name].Source.Mesh.Scale = Player.Character[Name].Source.Mesh.Scale / 1.15
  1398. Player.Character[Name].Source.Fire.Size = Player.Character[Name].Source.Fire.Size / 1.15
  1399. Player.Character[Name].Source.Fire.Heat = Player.Character[Name].Source.Fire.Heat / 1.15
  1400. Player.Character[Name].Handle.Shine.Volume = (25 - i) / 25
  1401. wait()
  1402. end
  1403. Player.Character[Name].Handle.Shine:Stop()
  1404. Player.Character[Name].Source.Transparency = 1
  1405. Player.Character[Name].Source.Fire.Enabled = false
  1406. canFire = true
  1407. elseif spell == 7 then
  1408. --Combuscus Phore, fire/explosives class. A small explosion with a bit of magic makes to be a spectacular performance.
  1409. canFire = false
  1410. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1411. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1412. Player.Character[Name].Source.Transparency = 0.25
  1413. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1414. Player.Character[Name].Source.Fire.Enabled = true
  1415. Player.Character[Name].Source.Fire.Heat = 10
  1416. Player.Character[Name].Source.Fire.Size = 10
  1417. Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
  1418. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1419. Player.Character[Name].Handle.Bolt.Looped = false
  1420. Player.Character[Name].Handle.Bolt.Volume = 1
  1421. Player.Character[Name].Handle.Bolt.Pitch = 1.5
  1422. Player.Character[Name].Handle.Bolt:Play()
  1423. power = power - 75
  1424. local shock = Instance.new("Part")
  1425. shock.FormFactor = "Custom"
  1426. shock.Size = Vector3.new(1, 1, 1)
  1427. shock.BrickColor = BrickColor.new("Really red")
  1428. shock.Anchored = true
  1429. shock.Name = "Shock Ring"
  1430. shock.CanCollide = false
  1431. shock.Parent = Workspace
  1432. local mesh = Instance.new("SpecialMesh")
  1433. mesh.MeshType = "FileMesh"
  1434. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  1435. mesh.Parent = shock
  1436. local tilt1 = math.random(-10, 10)
  1437. local tilt2 = math.random(-10, 10)
  1438. local tiltChance = math.random(1, 3)
  1439. for i = 0, 25 do
  1440. Player.Character[Name].Handle.Bolt.Pitch = Player.Character[Name].Handle.Bolt.Pitch - 0.1
  1441. shock.Mesh.Scale = Vector3.new(i, i, i) * (25 - i)
  1442. if tiltChance == 1 then
  1443. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), 0, 0)
  1444. elseif tiltChance == 2 then
  1445. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2), 0)
  1446. elseif tiltChance == 3 then
  1447. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + tilt1), math.rad(tilt2), 0)
  1448. end
  1449. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) / 5) * (25 - i)
  1450. Player.Character[Name].Source.Fire.Size = (i / 5) * (25 - i)
  1451. Player.Character[Name].Source.Fire.Heat = (i / 5) * (25 - i)
  1452. for _, model in pairs(Workspace:GetChildren()) do
  1453. if model.ClassName == "Part" then
  1454. if (Player.Character.Torso.Position - model.Position).magnitude <= (i * (25 - i)) / 2 and model.Anchored == false then
  1455. model.Velocity = ((model.Position - Player.Character.Torso.Position) * (math.sin(i / 4) * 10)) + Vector3.new(0, 25, 0)
  1456. if math.random(1, 10) == 1 then model:BreakJoints() end
  1457. end
  1458. elseif model.ClassName == "Model" and model ~= Player.Character then
  1459. for _, x in pairs(model:GetChildren()) do
  1460. if x.ClassName == "Part" then
  1461. if (Player.Character.Torso.Position - x.Position).magnitude <= (i * (25 - i)) / 2 and x.Anchored == false then
  1462. x.Velocity = ((x.Position - Player.Character.Torso.Position) * (math.sin(i / 4) * 10)) + Vector3.new(0, 25, 0)
  1463. if math.random(1, 10) == 1 then x:BreakJoints() end
  1464. if model:FindFirstChild("Humanoid") ~= nil then
  1465. model.Humanoid:TakeDamage(10)
  1466. model.Humanoid.Sit = true
  1467. end
  1468. end
  1469. end
  1470. end
  1471. end
  1472. end
  1473. wait(0.03)
  1474. end
  1475. shock:Remove()
  1476. Player.Character[Name].Source.Transparency = 1
  1477. Player.Character[Name].Source.Fire.Enabled = false
  1478. canFire = true
  1479. elseif spell == 8 then
  1480. --Combuscus Burn, fire/explosives class. Basically, light things on fire.
  1481. canFire = false
  1482. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1483. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1484. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1485. Player.Character[Name].Handle.Fire3.Looped = false
  1486. Player.Character[Name].Handle.Fire3.Volume = 1
  1487. Player.Character[Name].Handle.Fire3.Pitch = 1
  1488. Player.Character[Name].Handle.Fire3:Play()
  1489. Player.Character[Name].Handle.Fire4.Looped = false
  1490. Player.Character[Name].Handle.Fire4.Volume = 1
  1491. Player.Character[Name].Handle.Fire4.Pitch = 1
  1492. Player.Character[Name].Handle.Fire4:Play()
  1493. coroutine.resume(coroutine.create(function()
  1494. for i = 0, 1, 0.1 do
  1495. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5) + Vector3.new(1, 1, 1)
  1496. Player.Character[Name].Source.Transparency = i
  1497. wait()
  1498. end
  1499. Player.Character[Name].Source.Transparency = 1
  1500. end))
  1501. if mouse.Target == nil then return end
  1502. if mouse.Target.Parent == nil then return end
  1503. local function SetFire(target, offset)
  1504. if target == nil then return end
  1505. if offset == nil then offset = Vector3.new(0, 0, 0) end
  1506. if target:GetMass() > 3500 then return end
  1507. if target.Name == "CombuscusBurnFire" then return end
  1508. if target:FindFirstChild("CombuscusBurnFire") ~= nil then return end
  1509. if target:FindFirstChild("ForceField") ~= nil then return end
  1510. if target.Parent == nil then return end
  1511. if target.Parent:FindFirstChild("ForceField") ~= nil then return end
  1512. if target.Parent:FindFirstChild("HeedShield") ~= nil then return end
  1513. local check = Instance.new("Model")
  1514. check.Name = "CombuscusBurnFire"
  1515. check.Parent = target
  1516. delay(math.random(0.1, 2), function() if target ~= nil then target.Touched:connect(function(hit) if target:FindFirstChild("CombuscusBurnFire") ~= nil then SetFire(hit) end end) end end)
  1517. local part = Instance.new("Part")
  1518. part.Name = "CombuscusBurnFire"
  1519. part.CanCollide = false
  1520. part.Anchored = true
  1521. Part.FormFactor = "Custom"
  1522. part.Size = Vector3.new(1, 1, 1)
  1523. part.TopSurface = 0
  1524. part.BottomSurface = 0
  1525. part.Transparency = 1
  1526. part.Parent = Workspace
  1527. local fire = Instance.new("Fire")
  1528. fire.Color = Color3.new(1, math.random(10, 30) / 100, 0)
  1529. fire.SecondaryColor = Color3.new(1, 1, 1)
  1530. fire.Size = math.random(4, 15)
  1531. fire.Heat = fire.Size + 3
  1532. fire.Parent = part
  1533. local smoke = Instance.new("Smoke")
  1534. smoke.Color = Color3.new(0.5, 0.5, 0.5)
  1535. smoke.Size = fire.Size + 3
  1536. smoke.RiseVelocity = fire.Heat / 5
  1537. smoke.Opacity = math.random(1, 15) / 100
  1538. smoke.Parent = part
  1539. local sound = Instance.new("Sound")
  1540. sound.SoundId = "http://www.roblox.com/Asset/?id=31760113"
  1541. sound.Volume = 1
  1542. sound.Pitch = 1
  1543. sound.Looped = true
  1544. sound.Parent = part
  1545. sound:Play()
  1546. coroutine.resume(coroutine.create(function()
  1547. for i = 1, math.random(100, 1000) do
  1548. if part.Parent == nil then break end
  1549. if target.Parent == nil then break end
  1550. if target.Parent.Parent == nil then break end
  1551. if target:FindFirstChild("CombuscusBurnFire") == nil then break end
  1552. if Player.Character == nil then break end
  1553. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1554. if Player.Character.Humanoid.Health <= 0 then break end
  1555. part.CFrame = CFrame.new(target.Position + offset)
  1556. if target.Parent:FindFirstChild("Humanoid") ~= nil then
  1557. target.Parent.Humanoid:TakeDamage(0.25)
  1558. end
  1559. if math.random(1, 100) == 1 then target:BreakJoints() end
  1560. if math.random(1, 25) == 1 and target.Anchored == false then target.BrickColor = BrickColor.new("Really black") end
  1561. if math.random(1, 50) == 1 and target.Anchored == false then target.Velocity = target.Velocity + Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)) end
  1562. wait()
  1563. end
  1564. for i = 1, 0, -0.05 do
  1565. sound.Volume = i
  1566. fire.Size = fire.Size / 1.025
  1567. fire.Heat = fire.Heat / 1.01
  1568. fire.Color = Color3.new(1 * i, 0.25 * i, 0)
  1569. fire.SecondaryColor = Color3.new(1 * i, 1 * i, 1 * i)
  1570. smoke.Size = smoke.Size / 1.05
  1571. smoke.RiseVelocity = smoke.RiseVelocity / 1.05
  1572. smoke.Opacity = smoke.Opacity / 1.05
  1573. wait()
  1574. end
  1575. sound:Stop()
  1576. fire.Enabled = false
  1577. smoke.Enabled = false
  1578. if target ~= nil then if target:FindFirstChild("CombuscusBurnFire") ~= nil then target.CombuscusBurnFire:Remove() end end
  1579. wait(3)
  1580. part:Remove()
  1581. end))
  1582. end
  1583. pcall(function() SetFire(mouse.Target, mouse.Hit.p - mouse.Target.Position) end)
  1584. canFire = true
  1585. elseif spell == 9 then
  1586. --Combuscus Vortex, fire/explosives class. A tornado in a can.
  1587. canFire = false
  1588. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1589. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1590. Player.Character[Name].Source.Transparency = 0.25
  1591. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1592. Player.Character[Name].Source.Fire.Enabled = true
  1593. Player.Character[Name].Source.Fire.Heat = 10
  1594. Player.Character[Name].Source.Fire.Size = 10
  1595. Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
  1596. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1597. Player.Character[Name].Handle.Charge2.Looped = false
  1598. Player.Character[Name].Handle.Charge2.Volume = 1
  1599. Player.Character[Name].Handle.Charge2.Pitch = 0.125
  1600. Player.Character[Name].Handle.Charge2:Play()
  1601. power = power - 50
  1602. for i = 0, 75 do
  1603. if math.random(1, 3) == 1 then
  1604. local shock = Instance.new("Part")
  1605. shock.FormFactor = "Custom"
  1606. shock.Size = Vector3.new(1, 1, 1)
  1607. shock.BrickColor = BrickColor.new("Really red")
  1608. shock.Anchored = true
  1609. shock.Name = "Shock Ring"
  1610. shock.CanCollide = false
  1611. shock.Parent = Workspace
  1612. local mesh = Instance.new("SpecialMesh")
  1613. mesh.MeshType = "FileMesh"
  1614. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  1615. mesh.Parent = shock
  1616. coroutine.resume(coroutine.create(function()
  1617. local tilt1 = math.random(-10, 10)
  1618. local tilt2 = math.random(-10, 10)
  1619. local tiltChance = math.random(1, 3)
  1620. local randomSize = math.random(-10, 10)
  1621. for x = 1, 25 do
  1622. shock.Mesh.Scale = Vector3.new(5 + x, 5 + x, 5 + (x / 5)) + Vector3.new(randomSize, randomSize, randomSize)
  1623. if tiltChance == 1 then
  1624. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + (tilt1 / (25 - x))), 0, 0)
  1625. elseif tiltChance == 2 then
  1626. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90), math.rad(tilt2 / (25 - x)), 0)
  1627. elseif tiltChance == 3 then
  1628. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0) + Vector3.new(0, x, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(90 + (tilt1 / (25 - x))), math.rad(tilt2 / (25 - x)), 0)
  1629. end
  1630. wait()
  1631. end
  1632. end))
  1633. end
  1634. Player.Character[Name].Source.Mesh.Scale = Vector3.new(i, i, i) / 5
  1635. Player.Character[Name].Source.Fire.Size = i / 5
  1636. Player.Character[Name].Source.Fire.Heat = i / 5
  1637. for _, model in pairs(Workspace:GetChildren()) do
  1638. if model.ClassName == "Part" then
  1639. if (Player.Character.Torso.Position - model.Position).magnitude <= 50 and model.Anchored == false then
  1640. model.CanCollide = false
  1641. model.Transparency = 0.5
  1642. local Position = Instance.new("BodyPosition")
  1643. Position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1644. Position.P = 100
  1645. Position.D = 10
  1646. Position.position = Player.Character.Torso.Position + Vector3.new(math.sin(i / (math.random(500, 750) / 100)) * (i / 2) + 4, (i / (math.random(800, 1200) / 100)) + 5, math.cos(i / (math.random(500, 750) / 100)) * (i / 2) + 4)
  1647. Position.Parent = model
  1648. coroutine.resume(coroutine.create(function() wait(0.1) Position:Remove() end))
  1649. if math.random(1, 10) == 1 then model:BreakJoints() end
  1650. end
  1651. elseif model.ClassName == "Model" and model ~= Player.Character then
  1652. for _, x in pairs(model:GetChildren()) do
  1653. if x.ClassName == "Part" then
  1654. if (Player.Character.Torso.Position - x.Position).magnitude <= 50 and x.Anchored == false then
  1655. x.CanCollide = false
  1656. local Position = Instance.new("BodyPosition")
  1657. Position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1658. Position.P = 500
  1659. Position.D = 10
  1660. Position.position = Player.Character.Torso.Position + Vector3.new(math.sin(i / (math.random(500, 750) / 100)) * (i / 2) + 4, (i / (math.random(800, 1200) / 100)) + 7.5, math.cos(i / (math.random(500, 750) / 100)) * (i / 2) + 4)
  1661. Position.Parent = x
  1662. coroutine.resume(coroutine.create(function() wait(0.1) Position:Remove() end))
  1663. if math.random(1, 10) == 1 then x:BreakJoints() end
  1664. if model:FindFirstChild("Humanoid") ~= nil then
  1665. model.Humanoid:TakeDamage(10)
  1666. model.Humanoid.Sit = true
  1667. end
  1668. end
  1669. end
  1670. end
  1671. end
  1672. end
  1673. wait(0.03)
  1674. end
  1675. Player.Character[Name].Handle.Fire2.Looped = false
  1676. Player.Character[Name].Handle.Fire2.Volume = 1
  1677. Player.Character[Name].Handle.Fire2.Pitch = 0.3
  1678. Player.Character[Name].Handle.Fire2:Play()
  1679. Player.Character[Name].Source.Fire.Enabled = false
  1680. for i = 0.25, 1, 0.05 do
  1681. Player.Character[Name].Source.Transparency = i
  1682. wait()
  1683. end
  1684. Player.Character[Name].Source.Transparency = 1
  1685. canFire = true
  1686. elseif spell == 10 then
  1687. --Combuscus Phore Nexus, fire/explosives class. Basically the outcome is similar to that of a nuclear warhead.
  1688. canFire = false
  1689. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1690. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1691. Player.Character[Name].Source.Transparency = 0.25
  1692. Player.Character[Name].Source.BrickColor = BrickColor.new("Really red")
  1693. Player.Character[Name].Source.Fire.Enabled = true
  1694. Player.Character[Name].Source.Fire.Heat = 10
  1695. Player.Character[Name].Source.Fire.Size = 10
  1696. Player.Character[Name].Source.Fire.Color = Color3.new(1, 0, 0)
  1697. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1698. Player.Character[Name].Handle.Fire1.Looped = false
  1699. Player.Character[Name].Handle.Fire1.Volume = 1
  1700. Player.Character[Name].Handle.Fire1.Pitch = math.random(3, 6) / 10
  1701. local new = Player.Character[Name].Handle.Fire1:Clone()
  1702. new.Parent = Workspace
  1703. new:Play()
  1704. Player.Character[Name].Handle.Charge3.Looped = false
  1705. Player.Character[Name].Handle.Charge3.Volume = 1
  1706. Player.Character[Name].Handle.Charge3.Pitch = math.random(15, 20) / 10
  1707. local new = Player.Character[Name].Handle.Charge3:Clone()
  1708. new.Parent = Workspace
  1709. new:Play()
  1710. Player.Character[Name].Handle.Fire4.Looped = false
  1711. Player.Character[Name].Handle.Fire4.Volume = 1
  1712. Player.Character[Name].Handle.Fire4.Pitch = math.random(2, 4) / 10
  1713. local new = Player.Character[Name].Handle.Fire4:Clone()
  1714. new.Parent = Workspace
  1715. new:Play()
  1716. power = power - 100
  1717. local shock = Instance.new("Part")
  1718. shock.FormFactor = "Custom"
  1719. shock.Size = Vector3.new(1, 1, 1)
  1720. shock.BrickColor = BrickColor.new("Really red")
  1721. shock.Anchored = true
  1722. shock.Name = "Shock Ring"
  1723. shock.CanCollide = false
  1724. shock.Parent = Workspace
  1725. local mesh = Instance.new("SpecialMesh")
  1726. mesh.MeshType = "FileMesh"
  1727. mesh.MeshId = "http://www.roblox.com/Asset/?id=3270017"
  1728. mesh.Parent = shock
  1729. local shock2 = shock:Clone()
  1730. shock2.Parent = Workspace
  1731. local shock3 = shock:Clone()
  1732. shock3.Parent = Workspace
  1733. local shockAngle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
  1734. local shock2Angle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
  1735. local shock3Angle = CFrame.fromEulerAnglesXYZ(math.rad(90 + math.random(-5, 5)), math.rad(math.random(-5, 5)), math.rad(math.random(-5, 5)))
  1736. local shock2Size = math.random(2, 3)
  1737. local shock3Size = math.random(4, 6)
  1738. for i = 0, 500, 10 do
  1739. if string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i))) == "0" then
  1740. local shock4 = Instance.new("Part")
  1741. shock4.FormFactor = "Custom"
  1742. shock4.Size = Vector3.new(1, 1, 1)
  1743. shock4.BrickColor = BrickColor.new("Really red")
  1744. shock4.Anchored = true
  1745. shock4.Name = "Shock Ring"
  1746. shock4.CanCollide = false
  1747. shock4.Parent = Workspace
  1748. shock4.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 2, 0)) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)), math.rad(math.random(-25, 25)))
  1749. local mesh = Instance.new("SpecialMesh")
  1750. mesh.MeshType = "FileMesh"
  1751. mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
  1752. mesh.Parent = shock4
  1753. coroutine.resume(coroutine.create(function(part)
  1754. for i = 0, 1, 0.05 do
  1755. part.Transparency = i
  1756. part.Mesh.Scale = Vector3.new(i * 25, i * 25, i * 25)
  1757. wait()
  1758. end
  1759. part:Remove()
  1760. end), shock4)
  1761. end
  1762. shock.Transparency = i / 500
  1763. shock2.Transparency = i / 500
  1764. shock3.Transparency = i / 500
  1765. Player.Character[Name].Source.Transparency = i / 250
  1766. shock.Mesh.Scale = Vector3.new(i, i, i)
  1767. shock2.Mesh.Scale = Vector3.new(i, i, i) / shock2Size
  1768. shock3.Mesh.Scale = Vector3.new(i, i, i) / shock3Size
  1769. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shockAngle
  1770. shock2.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shock2Angle
  1771. shock3.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 3, 0)) * shock3Angle
  1772. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) / 15)
  1773. Player.Character[Name].Source.Fire.Size = (i / 15)
  1774. Player.Character[Name].Source.Fire.Heat = (i / 15)
  1775. for _, model in pairs(Workspace:GetChildren()) do
  1776. if model.ClassName == "Part" then
  1777. if (Player.Character.Torso.Position - model.Position).magnitude <= i / 2 and model.Anchored == false then
  1778. model.Velocity = (model.Position - Player.Character.Torso.Position) * 10 + Vector3.new(0, 25, 0)
  1779. if math.random(1, 10) == 1 then model:BreakJoints() end
  1780. end
  1781. elseif model.ClassName == "Model" and model ~= Player.Character then
  1782. for _, x in pairs(model:GetChildren()) do
  1783. if x.ClassName == "Part" then
  1784. if (Player.Character.Torso.Position - x.Position).magnitude <= i / 2 and x.Anchored == false then
  1785. x.Velocity = (x.Position - Player.Character.Torso.Position) * 10 + Vector3.new(0, 25, 0)
  1786. if math.random(1, 10) == 1 then x:BreakJoints() end
  1787. if model:FindFirstChild("Humanoid") ~= nil then
  1788. model.Humanoid:TakeDamage(10)
  1789. model.Humanoid.Sit = true
  1790. end
  1791. end
  1792. end
  1793. end
  1794. end
  1795. end
  1796. wait(0.03)
  1797. end
  1798. shock:Remove()
  1799. shock2:Remove()
  1800. shock3:Remove()
  1801. Player.Character[Name].Source.Transparency = 1
  1802. Player.Character[Name].Source.Fire.Enabled = false
  1803. canFire = true
  1804. elseif spell == 11 then
  1805. --Kanamla Cysis, object manipulation class. The easiest spell in it's class allows you to lightly pick things up.
  1806. local target = mouse.Target
  1807. if target == nil then return end
  1808. if target.Parent == nil then return end
  1809. if target.Anchored == true then return end
  1810. if (target.Position - Player.Character[Name].Source.Position).magnitude > 25 then return end
  1811. if game:GetService("Players"):GetPlayerFromCharacter(target.Parent) ~= nil then
  1812. if game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character:FindFirstChild("Torso") ~= nil then
  1813. target = game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character.Torso
  1814. if game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character:FindFirstChild("Humanoid") ~= nil then
  1815. game:GetService("Players"):GetPlayerFromCharacter(target.Parent).Character.Humanoid.PlatformStand = true
  1816. end
  1817. end
  1818. end
  1819. local position = Instance.new("BodyPosition")
  1820. position.Name = "Cysis"
  1821. position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1822. position.P = 1000
  1823. position.D = 50
  1824. position.Parent = target
  1825. position.position = Player.Character[Name].Source.Position + ((mouse.Hit.p - Player.Character[Name].Source.Position).unit * 10)
  1826. canFire = false
  1827. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1828. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1829. Player.Character[Name].Source.Transparency = 0.25
  1830. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright blue")
  1831. Player.Character[Name].Source.Fire.Enabled = true
  1832. Player.Character[Name].Source.Fire.Heat = 10
  1833. Player.Character[Name].Source.Fire.Size = 2
  1834. Player.Character[Name].Source.Fire.Color = Color3.new(0, 0, 1)
  1835. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(0.5, 0.5, 1)
  1836. Player.Character[Name].Handle.Shine.Looped = false
  1837. Player.Character[Name].Handle.Shine.Volume = 1
  1838. Player.Character[Name].Handle.Shine.Pitch = 0.75
  1839. Player.Character[Name].Handle.Shine:Play()
  1840. for i = 0, math.huge do
  1841. if Button1Down == false then break end
  1842. if Player.Character == nil then break end
  1843. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  1844. if Player.Character.Humanoid.Health <= 0 then break end
  1845. if Player.Character:FindFirstChild(Name) == nil then break end
  1846. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  1847. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  1848. if power <= 0 then break end
  1849. if string.sub(tostring(i), string.len(tostring(i)), string.len(tostring(i))) == "0" then
  1850. power = power - 1
  1851. end
  1852. if target ~= nil and position ~= nil then
  1853. position.position = Player.Character[Name].Source.Position + ((mouse.Hit.p - Player.Character[Name].Source.Position).unit * 10)
  1854. end
  1855. wait()
  1856. end
  1857. if position ~= nil then position:Remove() end
  1858. if target ~= nil then
  1859. if target.Parent:FindFirstChild("Humanoid") ~= nil then
  1860. target.Parent.Humanoid.PlatformStand = false
  1861. target.Parent.Humanoid.Sit = true
  1862. end
  1863. end
  1864. for i = 0.25, 1, 0.05 do
  1865. Player.Character[Name].Source.Transparency = i
  1866. wait()
  1867. end
  1868. Player.Character[Name].Source.Transparency = 1
  1869. Player.Character[Name].Source.Fire.Enabled = false
  1870. canFire = true
  1871. elseif spell == 12 then
  1872. --Kanamla Tepidift, object manipulation class. Allows you to teleport from one area to another.
  1873. canFire = false
  1874. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1875. Player.Character[Name].Source.BrickColor = BrickColor.new("Bright blue")
  1876. Player.Character[Name].Source.Fire.Enabled = true
  1877. Player.Character[Name].Source.Fire.Heat = 0
  1878. Player.Character[Name].Source.Fire.Color = Color3.new(0, 0, 1)
  1879. Player.Character[Name].Source.Fire.SecondaryColor = Color3.new(1, 1, 1)
  1880. Player.Character[Name].Handle.Shine.Looped = true
  1881. Player.Character[Name].Handle.Shine.Pitch = 1.5
  1882. Player.Character[Name].Handle.Shine.Volume = 1
  1883. Player.Character[Name].Handle.Shine:Play()
  1884. for i = 1, 0, -0.05 do
  1885. Player.Character[Name].Source.Transparency = i
  1886. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
  1887. Player.Character[Name].Source.Fire.Size = (1 - i) * 15
  1888. wait()
  1889. end
  1890. local maxDistance = (Player.Character.Torso.Position - mouse.Hit.p).magnitude
  1891. if maxDistance < 500 then
  1892. local pos1 = Player.Character.Torso.Position
  1893. local pos2 = mouse.Hit.p + Vector3.new(0, 3, 0)
  1894. local pos0 = pos1
  1895. for distance = 1, maxDistance, 5 do
  1896. pos0 = (CFrame.new(pos1, pos2) * CFrame.new(0, 0, -distance)).p
  1897. Player.Character.Torso.CFrame = CFrame.new(pos0, pos2)
  1898. Player.Character.Torso.Velocity = Vector3.new()
  1899. power = power - 1
  1900. wait()
  1901. end
  1902. Player.Character.Torso.CFrame = CFrame.new(pos2)
  1903. for i = 0, 1, 0.05 do
  1904. Player.Character[Name].Source.Transparency = i
  1905. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
  1906. Player.Character[Name].Source.Fire.Size = (1 - i) * 15
  1907. Player.Character[Name].Handle.Shine.Volume = (1 - i)
  1908. wait()
  1909. end
  1910. Player.Character[Name].Handle.Shine:Stop()
  1911. else
  1912. for i = 0, 1, 0.05 do
  1913. Player.Character[Name].Source.BrickColor = Player.Character[Name].Source.BrickColor == BrickColor.new("Bright blue") and BrickColor.new("Really red") or BrickColor.new("Bright blue")
  1914. Player.Character[Name].Source.Transparency = i
  1915. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(1 - i, 1 - i, 1 - i) * 15)
  1916. Player.Character[Name].Source.Fire.Size = (1 - i) * 15
  1917. Player.Character[Name].Source.Fire.Color = Player.Character[Name].Source.Fire.Color == Color3.new(0, 0, 1) and Color3.new(1, 0, 0) or Color3.new(0, 0, 1)
  1918. Player.Character[Name].Source.Fire.SecondaryColor = Player.Character[Name].Source.Fire.SecondaryColor == Color3.new(1, 1, 1) and Color3.new(1, 0, 0) or Color3.new(1, 1, 1)
  1919. Player.Character[Name].Handle.Shine.Pitch = (1 - i) + 0.5
  1920. wait()
  1921. end
  1922. Player.Character[Name].Handle.Shine:Stop()
  1923. end
  1924. Player.Character[Name].Source.Transparency = 1
  1925. Player.Character[Name].Source.Fire.Enabled = false
  1926. canFire = true
  1927. elseif spell == 13 then
  1928. --Kanamla Jump, object manipulation class. Allows you to jump really high.
  1929. canFire = false
  1930. while Button1Down == true do
  1931. if power <= 0 then break end
  1932. Player.Character[Name].Handle.Fire3.Looped = false
  1933. Player.Character[Name].Handle.Fire3.Pitch = 1
  1934. Player.Character[Name].Handle.Fire3.Volume = 1
  1935. for i = 1, 2 do Player.Character[Name].Handle.Fire3:Play() end
  1936. Player.Character[Name].Source.BrickColor = BrickColor.new("Really blue")
  1937. Player.Character.Humanoid.PlatformStand = true
  1938. Player.Character.Torso.Velocity = Vector3.new(Player.Character.Torso.Velocity.x, (Player.Character.Torso.Velocity.y / 2) + 100, Player.Character.Torso.Velocity.z)
  1939. power = power - 5
  1940. local shock = Instance.new("Part")
  1941. shock.FormFactor = "Custom"
  1942. shock.Size = Vector3.new(1, 1, 1)
  1943. shock.BrickColor = BrickColor.new("Really blue")
  1944. shock.Anchored = true
  1945. shock.Name = "Shock Ring"
  1946. shock.CanCollide = false
  1947. shock.Parent = Workspace
  1948. local mesh = Instance.new("SpecialMesh")
  1949. mesh.MeshType = "FileMesh"
  1950. mesh.MeshId = "http://www.roblox.com/Asset/?id=20329976"
  1951. mesh.Scale = Vector3.new(1, 1, 1)
  1952. mesh.Parent = shock
  1953. shock.CFrame = CFrame.new(Player.Character.Torso.Position - Vector3.new(0, 2.5, 0))
  1954. coroutine.resume(coroutine.create(function()
  1955. for i = 0, 50 do
  1956. mesh.Scale = Vector3.new(i, i / 5, i)
  1957. shock.Transparency = i / 50
  1958. wait()
  1959. end
  1960. shock:Remove()
  1961. end))
  1962. for i = 0, 1, 0.2 do
  1963. Player.Character[Name].Source.Transparency = i
  1964. Player.Character[Name].Source.Mesh.Scale = (Vector3.new(i, i, i) * 5)
  1965. wait()
  1966. end
  1967. Player.Character[Name].Source.Transparency = 1
  1968. Player.Character.Humanoid.PlatformStand = false
  1969. end
  1970. canFire = true
  1971. elseif spell == 14 then
  1972. --Candora Hide, light manipulation class. The Hide spell makes you and your wand seem invisible to the naked eye by bending light around your limbs.
  1973. canFire = false
  1974. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  1975. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  1976. Player.Character[Name].Source.BrickColor = BrickColor.new("Royal purple")
  1977. for i = 1, 0, -0.05 do
  1978. Player.Character[Name].Source.Transparency = i
  1979. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  1980. wait()
  1981. end
  1982. Player.Character[Name].Source.Transparency = 0
  1983. if Player.Character:FindFirstChild("Head") ~= nil then
  1984. if Player.Character.Head:FindFirstChild("face") ~= nil then
  1985. Player.Character.Head.face.Face = "Bottom"
  1986. end
  1987. end
  1988. Player.Character[Name].Handle.Shine.Looped = false
  1989. Player.Character[Name].Handle.Shine.Volume = 1
  1990. Player.Character[Name].Handle.Shine:Play()
  1991. for i = 0, 1.1, 0.01 do
  1992. Player.Character[Name].Handle.Shine.Pitch = math.sin(i)
  1993. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
  1994. for _, children in pairs(Player.Character:GetChildren()) do
  1995. if children.ClassName == "Part" and children.Name ~= "" then
  1996. children.Transparency = i
  1997. end
  1998. if children.Name == Name then
  1999. for _, children2 in pairs(children:GetChildren()) do
  2000. if children2.ClassName == "Part" then
  2001. children2.Transparency = i
  2002. end
  2003. end
  2004. end
  2005. end
  2006. wait()
  2007. end
  2008. while Button1Down == true do
  2009. if Player.Character == nil then break end
  2010. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  2011. if Player.Character.Humanoid.Health <= 0 then break end
  2012. if Player.Character:FindFirstChild(Name) == nil then break end
  2013. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  2014. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  2015. if power <= 0 then break end
  2016. power = power - 1
  2017. wait(0.5)
  2018. end
  2019. Player.Character[Name].Handle.Shine:Play()
  2020. for i = 1, -0.1, -0.01 do
  2021. Player.Character[Name].Handle.Shine.Pitch = math.sin(i)
  2022. Player.Character[Name].Source.Mesh.Scale = Vector3.new(math.sin(i), math.sin(i), math.sin(i)) + Vector3.new(2, 2, 2)
  2023. for _, children in pairs(Player.Character:GetChildren()) do
  2024. if children.ClassName == "Part" and children.Name ~= "" then
  2025. children.Transparency = i
  2026. end
  2027. if children.Name == Name then
  2028. for _, children2 in pairs(children:GetChildren()) do
  2029. if children2.ClassName == "Part" then
  2030. children2.Transparency = i
  2031. end
  2032. end
  2033. end
  2034. end
  2035. wait()
  2036. end
  2037. Player.Character[Name].Handle.Shine:Stop()
  2038. if Player.Character:FindFirstChild("Head") ~= nil then
  2039. if Player.Character.Head:FindFirstChild("face") ~= nil then
  2040. Player.Character.Head.face.Face = "Front"
  2041. end
  2042. end
  2043. for i = 0, 1, 0.05 do
  2044. Player.Character[Name].Source.Transparency = i
  2045. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  2046. wait()
  2047. end
  2048. Player.Character[Name].Source.Transparency = 1
  2049. canFire = true
  2050. elseif spell == 15 then
  2051. --Duraen Control, human manipulation class. Lets you control the movements of others.
  2052. Controlling = Controlling == nil and false or Controlling
  2053. ControlModel = ControlModel == nil and nil or ControlModel
  2054. if Controlling ~= true then
  2055. if mouse.Target == nil then return end
  2056. if mouse.Target.Parent == nil then return end
  2057. if mouse.Target.Parent:FindFirstChild("Humanoid") == nil then return end
  2058. if mouse.Target.Parent:FindFirstChild("Torso") == nil then return end
  2059. if mouse.Target.Parent:FindFirstChild("Head") == nil then return end
  2060. canFire = false
  2061. Controlling = true
  2062. ControlModel = mouse.Target.Parent
  2063. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  2064. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  2065. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  2066. Player.Character[Name].Handle.Shine.Looped = false
  2067. Player.Character[Name].Handle.Shine.Volume = 1
  2068. Player.Character[Name].Handle.Shine.Pitch = 2
  2069. Player.Character[Name].Handle.Shine:Play()
  2070. for i = 1, 0, -0.025 do
  2071. Player.Character[Name].Source.Transparency = i
  2072. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  2073. Player.Character[Name].Handle.Shine.Pitch = i * 2
  2074. wait()
  2075. end
  2076. Player.Character[Name].Source.Transparency = 0
  2077. Player.Character[Name].Handle.Shine:Stop()
  2078. coroutine.resume(coroutine.create(function()
  2079. for i = 0, 1, 0.05 do
  2080. Player.Character[Name].Source.Transparency = i
  2081. wait()
  2082. end
  2083. Player.Character[Name].Source.Transparency = 1
  2084. end))
  2085. Player.Character[Name].Handle.Fire2.Looped = false
  2086. Player.Character[Name].Handle.Fire2.Volume = 1
  2087. Player.Character[Name].Handle.Fire2.Pitch = 1
  2088. Player.Character[Name].Handle.Fire2:Play()
  2089. local Shot = Instance.new("Part", Workspace)
  2090. Shot.FormFactor = "Custom"
  2091. Shot.Shape = "Ball"
  2092. Shot.Size = Vector3.new(1, 1, 1)
  2093. Shot.CFrame = Player.Character[Name].Source.CFrame
  2094. Shot.CanCollide = false
  2095. Shot.BrickColor = BrickColor.new("Neon orange")
  2096. Shot.Transparency = 0.5
  2097. Shot.TopSurface = 0
  2098. Shot.BottomSurface = 0
  2099. local BodyVelocity = Instance.new("BodyVelocity", Shot)
  2100. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  2101. local Camera = Workspace.CurrentCamera
  2102. Camera.CameraSubject = Shot
  2103. while true do
  2104. if ControlModel == nil then break end
  2105. if ControlModel.Parent == nil then break end
  2106. if ControlModel:FindFirstChild("Humanoid") == nil then break end
  2107. if ControlModel.Humanoid.Health <= 0 then break end
  2108. if ControlModel:FindFirstChild("Torso") == nil then break end
  2109. if ControlModel:FindFirstChild("Head") == nil then break end
  2110. if Player.Character == nil then break end
  2111. if Player.Character.Parent == nil then break end
  2112. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  2113. if Player.Character.Humanoid.Health <= 0 then break end
  2114. if Player.Character:FindFirstChild("Torso") == nil then break end
  2115. if Player.Character:FindFirstChild("Head") == nil then break end
  2116. if Shot.Parent == nil then break end
  2117. if (ControlModel.Head.Position - Shot.Position).magnitude < 3 then break end
  2118. BodyVelocity.velocity = (ControlModel.Head.Position - Shot.Position).unit * (ControlModel.Humanoid.WalkSpeed * 1.5)
  2119. wait()
  2120. end
  2121. Shot:Remove()
  2122. if ControlModel:FindFirstChild("Humanoid") == nil then return end
  2123. if ControlModel:FindFirstChild("Torso") == nil then return end
  2124. if ControlModel:FindFirstChild("Head") == nil then return end
  2125. local ControlPlayer = nil
  2126. local Explosion = Instance.new("Part", Workspace)
  2127. Explosion.FormFactor = "Custom"
  2128. Explosion.Shape = "Ball"
  2129. Explosion.Size = Vector3.new(1, 1, 1)
  2130. Explosion.CFrame = ControlModel.Head.CFrame
  2131. Explosion.CanCollide = false
  2132. Explosion.Anchored = true
  2133. Explosion.BrickColor = BrickColor.new("Neon orange")
  2134. Explosion.Transparency = 0.5
  2135. Explosion.TopSurface = 0
  2136. Explosion.BottomSurface = 0
  2137. local Mesh = Instance.new("SpecialMesh")
  2138. Mesh.MeshType = "Sphere"
  2139. Mesh.Parent = Explosion
  2140. coroutine.resume(coroutine.create(function(Part)
  2141. for i = 0, 1, 0.05 do
  2142. Mesh.Scale = Vector3.new(i * 7.5, i * 2, i * 7.5)
  2143. Explosion.Transparency = i
  2144. Explosion.CFrame = Part.CFrame
  2145. wait()
  2146. end
  2147. Explosion:Remove()
  2148. end), ControlModel.Head)
  2149. local Camera = Workspace.CurrentCamera
  2150. Camera.CameraSubject = ControlModel.Humanoid
  2151. canFire = true
  2152. while Controlling == true and ControlModel:FindFirstChild("Humanoid") ~= nil and ControlModel:FindFirstChild("Torso") ~= nil and ControlModel:FindFirstChild("Head") ~= nil and spell == 15 and selected == true do
  2153. if Player.Character == nil then break end
  2154. if Player.Character:FindFirstChild("Humanoid") == nil then break end
  2155. if Player.Character.Humanoid.Health <= 0 then break end
  2156. if Player.Character:FindFirstChild(Name) == nil then break end
  2157. if Player.Character[Name]:FindFirstChild("Handle") == nil then break end
  2158. if Player.Character[Name]:FindFirstChild("Source") == nil then break end
  2159. if ControlModel.Humanoid.Health <= 0 then break end
  2160. if power <= 0 then break end
  2161. if math.random(1, 2) == 1 then power = power - 1 end
  2162. ControlModel.Humanoid:MoveTo(mouse.Hit.p, mouse.Target == nil and ControlModel.Torso or mouse.Target)
  2163. if mouse.Hit.p.y > ControlModel.Torso.Position.y then
  2164. ControlModel.Humanoid.Jump = true
  2165. end
  2166. wait()
  2167. end
  2168. if ControlModel.Parent ~= nil then
  2169. if ControlModel:FindFirstChild("Head") ~= nil then
  2170. local Explosion = Instance.new("Part", Workspace)
  2171. Explosion.Name = "Magical Explosion"
  2172. Explosion.FormFactor = "Custom"
  2173. Explosion.Shape = "Ball"
  2174. Explosion.Size = Vector3.new(1, 1, 1)
  2175. Explosion.CFrame = ControlModel.Head.CFrame
  2176. Explosion.CanCollide = false
  2177. Explosion.Anchored = true
  2178. Explosion.BrickColor = BrickColor.new("Neon orange")
  2179. Explosion.TopSurface = 0
  2180. Explosion.BottomSurface = 0
  2181. local Mesh = Instance.new("SpecialMesh")
  2182. Mesh.MeshType = "Sphere"
  2183. Mesh.Parent = Explosion
  2184. coroutine.resume(coroutine.create(function(Part)
  2185. for i = 1, 0, -0.05 do
  2186. Mesh.Scale = Vector3.new(i * 7.5, i * 2, i * 7.5)
  2187. Explosion.Transparency = i
  2188. Explosion.CFrame = Part.CFrame
  2189. wait()
  2190. end
  2191. Explosion:Remove()
  2192. end), ControlModel.Head)
  2193. end
  2194. end
  2195. Controlling = false
  2196. ControlModel = nil
  2197. Camera.CameraSubject = Player.Character:FindFirstChild("Humanoid")
  2198. canFire = false
  2199. if selected == true then
  2200. for i = 1, 0, -0.05 do
  2201. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  2202. Player.Character[Name].Source.Mesh.Scale = Vector3.new(2, 2, 2)
  2203. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  2204. Player.Character[Name].Source.Transparency = i
  2205. wait()
  2206. end
  2207. Player.Character[Name].Handle.Shine.Looped = false
  2208. Player.Character[Name].Handle.Shine.Volume = 1
  2209. Player.Character[Name].Handle.Shine.Pitch = 0
  2210. Player.Character[Name].Handle.Shine:Play()
  2211. for i = 0, 1, 0.025 do
  2212. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  2213. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  2214. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  2215. Player.Character[Name].Source.Transparency = i
  2216. Player.Character[Name].Handle.Shine.Pitch = i * 2
  2217. wait()
  2218. end
  2219. Player.Character[Name].Source.Transparency = 1
  2220. end
  2221. canFire = true
  2222. else
  2223. Controlling = false
  2224. end
  2225. elseif spell == 16 then
  2226. --Duraen Switch, human manipulation class. Dress up as the enemy... Or as a woman, you sicko.
  2227. if mouse.Target == nil then return end
  2228. if mouse.Target.Parent == nil then return end
  2229. if mouse.Target.Parent:FindFirstChild("Humanoid") == nil then return end
  2230. if mouse.Target.Parent:FindFirstChild("Torso") == nil then return end
  2231. if mouse.Target.Parent:FindFirstChild("Head") == nil then return end
  2232. canFire = false
  2233. local CharacterOne = Player.Character
  2234. local CharacterTwo = mouse.Target.Parent
  2235. Player.Character[Name].Source.Mesh.MeshType = "Sphere"
  2236. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1, 1, 1)
  2237. Player.Character[Name].Source.BrickColor = BrickColor.new("Neon orange")
  2238. Player.Character[Name].Handle.Shine.Looped = false
  2239. Player.Character[Name].Handle.Shine.Volume = 1
  2240. Player.Character[Name].Handle.Shine.Pitch = 2
  2241. Player.Character[Name].Handle.Shine:Play()
  2242. for i = 1, 0, -0.025 do
  2243. Player.Character[Name].Source.Transparency = i
  2244. Player.Character[Name].Source.Mesh.Scale = Vector3.new(1 - i, 1 - i, 1 - i) * 2
  2245. Player.Character[Name].Handle.Shine.Pitch = i * 2
  2246. wait()
  2247. end
  2248. Player.Character[Name].Source.Transparency = 0
  2249. Player.Character[Name].Handle.Shine:Stop()
  2250. coroutine.resume(coroutine.create(function()
  2251. for i = 0, 1, 0.05 do
  2252. Player.Character[Name].Source.Transparency = i
  2253. wait()
  2254. end
  2255. Player.Character[Name].Source.Transparency = 1
  2256. end))
  2257. coroutine.resume(coroutine.create(function()
  2258. local Explosion = Instance.new("Part", Workspace)
  2259. Explosion.Name = "Magical Explosion"
  2260. Explosion.FormFactor = "Custom"
  2261. Explosion.Shape = "Ball"
  2262. Explosion.Size = Vector3.new(1, 1, 1)
  2263. Explosion.CanCollide = false
  2264. Explosion.Anchored = true
  2265. Explosion.BrickColor = BrickColor.new("Neon orange")
  2266. Explosion.TopSurface = 0
  2267. Explosion.BottomSurface = 0
  2268. local Mesh = Instance.new("SpecialMesh")
  2269. Mesh.MeshType = "Sphere"
  2270. Mesh.Parent = Explosion
  2271. coroutine.resume(coroutine.create(function(Part)
  2272. for i = 0, 7, 0.1 do
  2273. Mesh.Scale = Vector3.new(i, i * 2, i)
  2274. Explosion.CFrame = Part.CFrame
  2275. wait()
  2276. end
  2277. for i = 7, 14, 0.1 do
  2278. Mesh.Scale = Vector3.new(i, i * 2, i)
  2279. Explosion.Transparency = (i - 7) / 7
  2280. Explosion.CFrame = Part.CFrame
  2281. wait()
  2282. end
  2283. Explosion:Remove()
  2284. end), CharacterOne.Torso)
  2285. local Explosion = Instance.new("Part", Workspace)
  2286. Explosion.Name = "Magical Explosion"
  2287. Explosion.FormFactor = "Custom"
  2288. Explosion.Shape = "Ball"
  2289. Explosion.Size = Vector3.new(1, 1, 1)
  2290. Explosion.CanCollide = false
  2291. Explosion.Anchored = true
  2292. Explosion.BrickColor = BrickColor.new("Neon orange")
  2293. Explosion.TopSurface = 0
  2294. Explosion.BottomSurface = 0
  2295. local Mesh = Instance.new("SpecialMesh")
  2296. Mesh.MeshType = "Sphere"
  2297. Mesh.Parent = Explosion
  2298. coroutine.resume(coroutine.create(function(Part)
  2299. for i = 0, 7, 0.1 do
  2300. Mesh.Scale = Vector3.new(i, i * 2, i)
  2301. Explosion.CFrame = Part.CFrame
  2302. wait()
  2303. end
  2304. for i = 7, 14, 0.1 do
  2305. Mesh.Scale = Vector3.new(i, i * 2, i)
  2306. Explosion.Transparency = (i - 7) / 7
  2307. Explosion.CFrame = Part.CFrame
  2308. wait()
  2309. end
  2310. Explosion:Remove()
  2311. end), CharacterTwo.Torso)
  2312. end))
  2313. wait(2)
  2314. local CharacterOneParts = Instance.new("Model")
  2315. local CharacterTwoParts = Instance.new("Model")
  2316. if CharacterOne.Head:FindFirstChild("face") ~= nil then
  2317. CharacterOne.Head.face.Parent = CharacterOneParts
  2318. end
  2319. if CharacterOne.Head:FindFirstChild("Mesh") ~= nil then
  2320. CharacterOne.Head.Mesh.Parent = CharacterOneParts
  2321. end
  2322. if CharacterOne.Torso:FindFirstChild("roblox") ~= nil then
  2323. CharacterOne.Torso.roblox.Parent = CharacterOneParts
  2324. end
  2325. for _, Part in pairs(CharacterOne:GetChildren()) do
  2326. if Part.ClassName == "Shirt" or Part.ClassName == "Pants" or Part.ClassName == "CharacterMesh" or Part.ClassName == "ShirtGraphic" or Part.ClassName == "Hat" or Part.ClassName == "Accoutrement" or Part.ClassName == "BodyColors" then
  2327. Part.Parent = CharacterOneParts
  2328. end
  2329. end
  2330. if CharacterTwo.Head:FindFirstChild("face") ~= nil then
  2331. CharacterTwo.Head.face.Parent = CharacterTwoParts
  2332. end
  2333. if CharacterTwo.Head:FindFirstChild("Mesh") ~= nil then
  2334. CharacterTwo.Head.Mesh.Parent = CharacterTwoParts
  2335. end
  2336. if CharacterTwo.Torso:FindFirstChild("roblox") ~= nil then
  2337. CharacterTwo.Torso.roblox.Parent = CharacterTwoParts
  2338. end
  2339. for _, Part in pairs(CharacterTwo:GetChildren()) do
  2340. if Part.ClassName == "Shirt" or Part.ClassName == "Pants" or Part.ClassName == "CharacterMesh" or Part.ClassName == "ShirtGraphic" or Part.ClassName == "Hat" or Part.ClassName == "Accoutrement" or Part.ClassName == "BodyColors" then
  2341. Part.Parent = CharacterTwoParts
  2342. end
  2343. end
  2344. for _, Part in pairs(CharacterOneParts:GetChildren()) do
  2345. if Part.Name == "face" or Part.Name == "Mesh" then
  2346. Part.Parent = CharacterTwo.Head
  2347. elseif Part.Name == "roblox" then
  2348. Part.Parent = CharacterTwo.Torso
  2349. else
  2350. Part.Parent = CharacterTwo
  2351. end
  2352. end
  2353. for _, Part in pairs(CharacterTwoParts:GetChildren()) do
  2354. if Part.Name == "face" or Part.Name == "Mesh" then
  2355. Part.Parent = CharacterOne.Head
  2356. elseif Part.Name == "roblox" then
  2357. Part.Parent = CharacterOne.Torso
  2358. else
  2359. Part.Parent = CharacterOne
  2360. end
  2361. end
  2362. canFire = true
  2363. end
  2364. end
  2365.  
  2366.  
  2367. function onButton1Up(mouse)
  2368. if selected == false then return end
  2369. Button1Down = false
  2370. while canFire == false do wait() end
  2371. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  2372. end
  2373.  
  2374.  
  2375. function onKeyDown(key, mouse)
  2376. if selected == false or canFire == false or Button1Down == true then return end
  2377. key = key:lower()
  2378. if key == "q" then
  2379. if mouse.Target == nil then return end
  2380. if game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent) ~= nil then
  2381. onDeselected(mouse)
  2382. removeParts("holster")
  2383. script.Parent.Parent = game:GetService("Players"):GetPlayerFromCharacter(mouse.Target.Parent).Backpack
  2384. end
  2385. end
  2386. if key == "e" then
  2387. spell = spell - 1
  2388. if spell < 0 then
  2389. spell = 16
  2390. end
  2391. end
  2392. if key == "r" then
  2393. spell = spell + 1
  2394. if spell > 16 then
  2395. spell = 0
  2396. end
  2397. end
  2398. if key == "t" then
  2399. spellHotkey1Delay = time()
  2400. end
  2401. if key == "y" then
  2402. spellHotkey2Delay = time()
  2403. end
  2404. if key == "u" then
  2405. spellHotkey3Delay = time()
  2406. end
  2407. updateSpellText()
  2408. updateGui()
  2409. end
  2410.  
  2411.  
  2412. function onKeyUp(key, mouse)
  2413. if selected == false or canFire == false or Button1Down == true then return end
  2414. key = key:lower()
  2415. if key == "t" then
  2416. if time() - spellHotkey1Delay > 1 then
  2417. spellHotkey1 = spell
  2418. local HotkeyMessage = Instance.new("Message", Player)
  2419. HotkeyMessage.Text = "Set hotkey 1."
  2420. wait(2.5)
  2421. HotkeyMessage:Remove()
  2422. else
  2423. spell = spellHotkey1
  2424. end
  2425. end
  2426. if key == "y" then
  2427. if time() - spellHotkey2Delay > 1 then
  2428. spellHotkey2 = spell
  2429. local HotkeyMessage = Instance.new("Message", Player)
  2430. HotkeyMessage.Text = "Set hotkey 2."
  2431. wait(2.5)
  2432. HotkeyMessage:Remove()
  2433. else
  2434. spell = spellHotkey2
  2435. end
  2436. end
  2437. if key == "u" then
  2438. if time() - spellHotkey3Delay > 1 then
  2439. spellHotkey3 = spell
  2440. local HotkeyMessage = Instance.new("Message", Player)
  2441. HotkeyMessage.Text = "Set hotkey 3."
  2442. wait(2.5)
  2443. HotkeyMessage:Remove()
  2444. else
  2445. spell = spellHotkey3
  2446. end
  2447. end
  2448. updateSpellText()
  2449. updateGui()
  2450. end
  2451.  
  2452.  
  2453. function onSelected(mouse)
  2454. if selected == true or dropped == true then return end
  2455. selected = true
  2456. mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"
  2457. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  2458. if Player.Character.WeaponActivated.Value == nil then break end
  2459. if Player.Character.WeaponActivated.Value.Parent == nil then break end
  2460. wait()
  2461. end
  2462. mouse.Icon = "rbxasset://textures\\GunCursor.png"
  2463. updateSpellText()
  2464. updateGui()
  2465. removeParts("holster")
  2466. makeParts("hand")
  2467. local weapon = Instance.new("ObjectValue")
  2468. weapon.Name = "WeaponActivated"
  2469. weapon.Value = script.Parent
  2470. weapon.Parent = Player.Character
  2471. DisableLimb(1, Player.Character)
  2472. SetAngle(1, math.rad(90), Player.Character)
  2473. mouse.Button1Down:connect(function() onButton1Down(mouse) end)
  2474. mouse.Button1Up:connect(function() onButton1Up(mouse) end)
  2475. mouse.KeyDown:connect(function(key) onKeyDown(key, mouse) end)
  2476. mouse.KeyUp:connect(function(key) onKeyUp(key, mouse) end)
  2477. while selected == true do
  2478. if canFire == true then
  2479. if power < 100 and power >= 0 then
  2480. power = power + 1
  2481. wait(0.05)
  2482. elseif power < 0 then
  2483. power = power + 1
  2484. wait(0.3)
  2485. elseif power > 100 then
  2486. power = power - 1
  2487. wait(1)
  2488. else
  2489. power = 100
  2490. end
  2491. end
  2492. updateSpellText()
  2493. updateGui()
  2494. wait()
  2495. end
  2496. end
  2497.  
  2498.  
  2499. function onDeselected(mouse)
  2500. if selected == false then return end
  2501. selected = false
  2502. Button1Down = false
  2503. while canFire == false do
  2504. wait()
  2505. end
  2506. if Player.Character:FindFirstChild("WeaponActivated") ~= nil then
  2507. if Player.Character.WeaponActivated.Value == script.Parent then
  2508. Player.Character.WeaponActivated:Remove()
  2509. end
  2510. end
  2511. while Player.Character:FindFirstChild("WeaponActivated") ~= nil do
  2512. if Player.Character.WeaponActivated.Value == nil then break end
  2513. if pcall(function() if Player.Character.WeaponActivated.Value.Parent == nil then return true end end) then break end
  2514. wait()
  2515. end
  2516. if Player.PlayerGui:FindFirstChild(Name) ~= nil then Player.PlayerGui[Name]:Remove() end
  2517. removeParts("hand")
  2518. makeParts("holster")
  2519. SetAngle(1, 0, Player.Character)
  2520. EnableLimb(1, Player.Character)
  2521. end
  2522.  
  2523.  
  2524. if script.Parent.ClassName ~= "HopperBin" then
  2525. if Player == nil then print("Error: Player not found!") return end
  2526. local Tool = Instance.new("HopperBin")
  2527. Tool.Name = Name
  2528. Tool.Parent = Player.Backpack
  2529. script.Name = "Main"
  2530. script.Parent = Tool
  2531. elseif script.Parent.ClassName == "HopperBin" then
  2532. while script.Parent.Parent.ClassName ~= "Backpack" do
  2533. wait()
  2534. end
  2535. Player = script.Parent.Parent.Parent
  2536. makeParts("holster")
  2537. script.Parent.Selected:connect(onSelected)
  2538. script.Parent.Deselected:connect(onDeselected)
  2539. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement