Advertisement
Guest User

Untitled

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