Advertisement
Demonlord27

wanda2

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