zed_isJayTheLionJR

ThebbvccccvcKvccnIvvvNvvvjbG

Dec 15th, 2018
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Modelname = "u have found the king"
  2. Toolname = "Kings power"
  3. Surfaces = {"FrontSurface", "BackSurface", "TopSurface", "BottomSurface", "LeftSurface", "RightSurface"}
  4. local Selected = false
  5. local inuse = false
  6. local mousedown = false
  7. local Character = nil
  8.  
  9. function Execute(f)
  10. return coroutine.resume(coroutine.create(function()f()end))
  11. end
  12.  
  13. function Part(Parent, Anchor, Collide, Tran, Ref, Color, X, Y, Z, Break)
  14. local p = Instance.new("Part")
  15. p.formFactor = "Custom"
  16. p.Anchored = Anchor
  17. p.CanCollide = Collide
  18. p.Transparency = 1
  19. p.Reflectance = Ref
  20. p.BrickColor = BrickColor.new(Color)
  21. p.Material = 272
  22.  
  23. for _, Surf in pairs(Surfaces) do
  24. p[Surf] = "Smooth"
  25. end
  26.  
  27. p.Size = Vector3.new(X, Y, Z)
  28.  
  29. if Break then
  30. p:BreakJoints()
  31. else
  32. p:MakeJoints()
  33. end
  34.  
  35. p.Parent = Parent
  36. p.Locked = true
  37.  
  38. return p
  39. end
  40.  
  41. function Weld(p0, p1, x, y, z, a, b, c)
  42. local w = Instance.new("Weld")
  43. w.Parent = p0
  44. w.Part0 = p0
  45. w.Part1 = p1
  46. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(a,b,c)
  47. return w
  48. end
  49.  
  50. Add = {
  51. Sphere = function(P)
  52. local m = Instance.new("SpecialMesh",P)
  53. m.MeshType = "Sphere"
  54. return m
  55. end,
  56. Mesh = function(P, ID, x, y, z)
  57. local m = Instance.new("SpecialMesh")
  58. m.MeshId = ID
  59. m.Scale = Vector3.new(x, y, z)
  60. m.Parent = P
  61. return m
  62. end,
  63. Sound = function(P, ID, vol, pitch)
  64. local s = Instance.new("Sound")
  65. s.SoundId = ID
  66. s.Volume = vol
  67. s.Pitch = pitch
  68. s.Parent = P
  69. return s
  70. end
  71. }
  72.  
  73.  
  74. local Model,handle,toptip,bottip,HB,HW,TH,HBW,Crystal
  75. local player = game.Players.JayTheLionJR
  76. local StaffModel = nil
  77. local Rarm = nil
  78. local RABrick, RABW, RAW
  79.  
  80. function GenerateModel(Parent,Torso,Rarm)
  81. Model = Instance.new("Model")
  82. Model.Name = Modelname
  83. handle = Part(Model, false, false, 0, 0, "Brown", 0.3, 4.4, 0.3, true)
  84. handle.Name = "Handle"
  85. Instance.new("CylinderMesh",handle)
  86. toptip = Part(Model, false, false, 0, 0, "Brown", 0.6, 0.2, 0.6, true)
  87. Weld(handle, toptip, 0, -2, 0, 0, 0, 0)
  88. Instance.new("CylinderMesh",toptip)
  89. Crystal = Part(Model, false, false, 0, 0.2, "Bright blue", 0.5, 0.75, 0.5, true)
  90. local w1 = Weld(handle, Crystal, 0, -2.2, 0, 0, 0, 0)
  91. Add.Mesh(Crystal, "http://www.roblox.com/asset/?id=9756362", 0.5, 0.75, 0.5)
  92. Crystal.Reflectance = 0.25
  93. Crystal.Transparency = 0.25
  94. local BotTip = Part(Model, false, false, 0, 0, "Brown", 0.2, 1.5, 0.2, true)
  95. local w1 = Weld(handle, BotTip, 0, 2.15, 0, 0, 0, 0)
  96. Add.Mesh(BotTip, "http://www.roblox.com/asset/?id=9756362", 0.4, 0.7, 0.4)
  97. Model.Parent = Parent
  98. StaffModel = Model
  99.  
  100. RABrick = Part(Model, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  101. RABW = Weld(Torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  102. RAW = Weld(RABrick, nil, 0, 0.5, 0, 0, 0, 0)
  103.  
  104. HB = Part(Model, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  105. HBW = Weld(Rarm, HB, 0, 1, -1.5, 0, 0, 0)
  106. HW = Weld(HB, nil, 0, -1.3, 0, math.pi/2, 0, 0)
  107. TH = Weld(Torso, nil, -0.6, 0.1, 0, 0, math.pi/2, math.rad(-140))
  108. TH.Part1 = handle
  109.  
  110. end
  111.  
  112. local tool = nil
  113. function GenerateTool()
  114. if player:IsA("Player") then
  115. if player.Character ~= nil then
  116. if player.Character:FindFirstChild("Torso") ~= nil then
  117. if player.Character:FindFirstChild(Modelname) == nil then
  118. if player.Character:FindFirstChild("Right Arm") then
  119. GenerateModel(player.Character,player.Character:FindFirstChild("Torso"),player.Character:FindFirstChild("Right Arm"))
  120. Rarm = player.Character:FindFirstChild("Right Arm")
  121. Character = player.Character
  122. end
  123. else
  124. StaffModel = player.Character:FindFirstChild(Modelname)
  125. end
  126. if player.Character:FindFirstChild(Modelname) ~= nil then
  127. if player.Backpack:FindFirstChild(Toolname) == nil then
  128. tool = Instance.new("HopperBin",player.Backpack)
  129. tool.Name = Toolname
  130. wait()
  131. script.Parent = tool
  132. end
  133. end
  134. end
  135. end
  136. end
  137. end
  138.  
  139. function ToolAnimSelect()
  140. RAW.Part1 = Rarm
  141. local ah = CFrame.Angles(0, 0, math.rad(90))
  142. RAW.Part1 = Rarm
  143. for i = 0, 270, 270/5 do
  144. RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0)
  145. wait()
  146. end
  147. HW.C0 = ah
  148. TH.Part1 = nil
  149. HW.Part1 = handle
  150. for i = 270, 70, -200/5 do
  151. RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0)
  152. wait()
  153. end
  154. RAW.C0 = CFrame.new(0, 0, -70/500) * CFrame.Angles(70,0,0)
  155. inuse = false
  156. end
  157.  
  158. function ToolAnimUnSelect()
  159. RAW.Part1 = Rarm
  160. local ah = CFrame.Angles(0, 0, math.rad(90))
  161. for i = 70, 270, 200/5 do
  162. RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0)
  163. wait()
  164. end
  165. HW.C0 = ah
  166. HW.Part1 = nil
  167. TH.Part1 = handle
  168. for i = 270, 0, -270/5 do
  169. RAW.C0 = CFrame.new(0, 0, -i/500) * CFrame.Angles(math.rad(i), math.rad(i/4), 0)
  170. wait()
  171. end
  172. RAW.Part1 = nil
  173. inuse = false
  174. end
  175.  
  176. function prop(part, parent, collide, tran, ref, x, y, z, color)
  177. part.Parent = parent
  178. part.formFactor = 3
  179. part.Anchored = true
  180. part.CanCollide = collide
  181. part.Transparency = 1
  182. part.Reflectance = ref
  183. part.Material = 288
  184. part.Size = Vector3.new(x,y,z)
  185. part.BrickColor = BrickColor.new(color)
  186. part.TopSurface = 0
  187. part.BottomSurface = 0
  188. part:BreakJoints()
  189. end
  190.  
  191. local a,b,c -- explosion
  192. function Selected(mouse)
  193. if inuse == false then
  194. inuse = true
  195. ToolAnimSelect()
  196. Selected = true
  197. end
  198. if Selected == true then
  199. mouse.Button1Down:connect(function()
  200. mousedown = true
  201. while mousedown do
  202. if Character:FindFirstChild("Humanoid") ~= nil then
  203. if Character:FindFirstChild("Humanoid").Health > 0 then
  204. if Character:FindFirstChild("ForceField") == nil then
  205. c = Instance.new("ForceField",Character)
  206. end
  207. b = Instance.new("Part")
  208. prop(b, Character, false, 0.4, 0.25, 0.05, 0.05, (Crystal.Position - mouse.hit.p).magnitude, "Cyan")
  209. b.CFrame = CFrame.new(Crystal.Position, mouse.hit.p) * CFrame.new(0,0,-b.Size.Z/2)
  210. local ex = Instance.new("Explosion")
  211. ex.Parent = Character
  212. ex.DestroyJointRadiusPercent = 1
  213. ex.ExplosionType = 2
  214. ex.Position = mouse.hit.p
  215. ex.BlastRadius = 1000
  216. ex.BlastPressure = 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  217. game:GetService("Debris"):AddItem(b,.25)
  218. end
  219. end
  220. wait(0.1)
  221.  
  222. end
  223. end)
  224. mouse.Button1Up:connect(function()
  225. if Character:FindFirstChild("ForceField") ~= nil then
  226. game:GetService("Debris"):AddItem(Character:FindFirstChild("ForceField"),.5)
  227. end
  228. mousedown = false
  229. end)
  230. end
  231. end
  232.  
  233.  
  234.  
  235.  
  236. function UnSelected()
  237. if inuse == false then
  238. if Character:FindFirstChild("ForceField") ~= nil then
  239. game:GetService("Debris"):AddItem(Character:FindFirstChild("ForceField"),.5)
  240. end
  241. mousedown = false
  242. inuse = true
  243. ToolAnimUnSelect()
  244. HW.Part1 = nil
  245. TH.Part1 = handle
  246. Selected = false
  247. end
  248. end
  249.  
  250. GenerateTool()
  251.  
  252. if tool ~= nil then
  253. tool.Selected:connect(Selected)
  254. tool.Deselected:connect(UnSelected)
  255. end
  256. p = game.Players.LocalPlayer
  257. char = p.Character
  258. local char = p.Character
  259. torso = char.Torso
  260. neck = char.Torso.Neck
  261. hum = char.Humanoid
  262. Player = game:GetService("Players").LocalPlayer
  263. Character = Player.Character
  264. tors = Character.Torso
  265. root = Character.HumanoidRootPart
  266. lleg = Character["Left Leg"]
  267. hed = Character.Head
  268. rleg = Character["Right Leg"]
  269. rarm = Character["Right Arm"]
  270. larm = Character["Left Arm"]
  271.  
  272. ypcall(function()
  273. for i,v in pairs(Character:children()) do
  274. if v:IsA("Hat") then
  275. v:Destroy()
  276. end
  277. end
  278. for i,v in pairs(Character:children()) do
  279. if v:IsA("Accessory") then
  280. v:Destroy()
  281. end
  282. end
  283. for i,v in pairs(Character:children()) do
  284. if v:IsA("Hair") then
  285. v:Destroy()
  286. end
  287. end
  288. end)
  289.  
  290. CV="Hot pink"
  291.  
  292. local txt = Instance.new("BillboardGui", char)
  293. txt.Adornee = char .Head
  294. txt.Name = "_status"
  295. txt.Size = UDim2.new(2, 0, 1.2, 0)
  296. txt.StudsOffset = Vector3.new(-9, 8, 0)
  297. local text = Instance.new("TextLabel", txt)
  298. text.Size = UDim2.new(10, 0, 7, 0)
  299. text.FontSize = "Size100"
  300. text.TextScaled = true
  301. text.TextTransparency = 0
  302. text.BackgroundTransparency = 1
  303. text.TextTransparency = 0
  304. text.TextStrokeTransparency = 0
  305. text.Font = "Fantasy"
  306. text.TextStrokeColor3 = BrickColor.new("Really black").Color
  307.  
  308. v=Instance.new("Part")
  309. v.Name = "ColorBrick"
  310. v.Parent=p.Character
  311. v.FormFactor="Symmetric"
  312. v.Anchored=true
  313. v.CanCollide=false
  314. v.BottomSurface="Smooth"
  315. v.TopSurface="Smooth"
  316. v.Size=Vector3.new(10,5,3)
  317. v.Transparency=1
  318. v.CFrame=char.Torso.CFrame
  319. v.BrickColor=BrickColor.new(CV)
  320. v.Transparency=1
  321. text.TextColor3 = BrickColor.new("Deep orange").Color
  322. v.Shape="Block"
  323. text.Text = "The KING"
  324.  
  325. hed.face.Texture = "http://www.roblox.com/asset/?id=0"
  326. hed.Transparency = 0.5
  327. rleg.Transparency = 0.5
  328. rarm.Transparency = 0.5
  329. larm.Transparency = 0.5
  330. lleg.Transparency = 0.5
  331. tors.Transparency = 0.5
  332.  
  333. Player = game:GetService("Players").LocalPlayer
  334. Character = Player.Character
  335. rarm = Character["Right Arm"]
  336. larm = Character["Left Arm"]
  337. vt = Vector3.new
  338. bc = BrickColor.new
  339. wit = bc("Deep orange").Color
  340.  
  341. local prth = Instance.new("Part",Character)
  342. prth.Size = vt(1.25,1.25,1.25)
  343. prth.CanCollide = false
  344. prth.Material = "Neon"
  345. prth.Transparency = 0.5
  346. prth.BrickColor = bc("Deep orange")
  347. local wldh = Instance.new("Weld",Character)
  348. wldh.Part0 = hed
  349. wldh.Part1 = prth
  350.  
  351. local prtrm = Instance.new("Part",Character)
  352. prtrm.Size = vt(2.1,2.1,1.1)
  353. prtrm.CanCollide = false
  354. prtrm.Transparency = 0.5
  355. prtrm.Material = "Neon"
  356. prtrm.BrickColor = bc("Deep orange")
  357. local wldm = Instance.new("Weld",Character)
  358. wldm.Part0 = root
  359. wldm.Part1 = prtrm
  360.  
  361. local prtr = Instance.new("Part",Character)
  362. prtr.Size = vt(1.1,2.1,1.1)
  363. prtr.CanCollide = false
  364. prtr.Transparency = 0.5
  365. prtr.Material = "Neon"
  366. prtr.BrickColor = bc("Deep orange")
  367. local prtrl = Instance.new("Part",Character)
  368. prtrl.Size = vt(1.1,2.1,1.1)
  369. prtrl.CanCollide = false
  370. prtrl.Transparency = 0.5
  371. prtrl.Material = "Neon"
  372. prtrl.BrickColor = bc("Deep orange")
  373. local eff = Instance.new("ParticleEmitter",prtr)
  374. eff.LightEmission = 1
  375. eff.Texture = "rbxassetid://284205403"
  376. eff.Color = ColorSequence.new(wit)
  377. eff.Size = NumberSequence.new(0.5,1)
  378. eff.Acceleration = vt(0,25,0)
  379. eff.Speed = NumberRange.new(-5)
  380. eff.LockedToPart = false
  381. eff.Transparency = NumberSequence.new(0.95)
  382. eff.Lifetime = NumberRange.new(0.5)
  383. eff.Rate = 100000
  384. eff.VelocitySpread = 25
  385. local wld = Instance.new("Weld",Character)
  386. wld.Part0 = rarm
  387. wld.Part1 = prtr
  388. local wldl = Instance.new("Weld",Character)
  389. wldl.Part0 = rleg
  390. wldl.Part1 = prtrl
  391.  
  392. local prtr2 = Instance.new("Part",Character)
  393. prtr2.Size = vt(1.1,2.1,1.1)
  394. prtr2.CanCollide = false
  395. prtr2.Transparency = 0.5
  396. prtr2.Material = "Neon"
  397. prtr2.BrickColor = bc("Deep orange")
  398. local prtrl2 = Instance.new("Part",Character)
  399. prtrl2.Size = vt(1.1,2.1,1.1)
  400. prtrl2.CanCollide = false
  401. prtrl2.Transparency = 0.5
  402. prtrl2.Material = "Neon"
  403. prtrl2.BrickColor = bc("Deep orange")
  404. local eff2 = Instance.new("ParticleEmitter",prtr2)
  405. eff2.LightEmission = 1
  406. eff2.Texture = "rbxassetid://284205403"
  407. eff2.Color = ColorSequence.new(wit)
  408. eff2.Size = NumberSequence.new(0.5,1)
  409. eff2.Acceleration = vt(0,25,0)
  410. eff2.Speed = NumberRange.new(-5)
  411. eff2.LockedToPart = false
  412. eff2.Transparency = NumberSequence.new(0.95)
  413. eff2.Lifetime = NumberRange.new(0.5)
  414. eff2.Rate = 100000
  415. eff2.VelocitySpread = 25
  416. local wld2 = Instance.new("Weld",Character)
  417. wld2.Part0 = larm
  418. wld2.Part1 = prtr2
  419. local wldl2 = Instance.new("Weld",Character)
  420. wldl2.Part0 = lleg
  421. wldl2.Part1 = prtrl2
  422.  
  423. local mouse = game.Players.LocalPlayer:GetMouse()
  424. tors = game.Players.LocalPlayer.Character.Torso
  425. vt = Vector3.new
  426. bc = BrickColor.new
  427.  
  428. local Effect = Instance.new("Part",game.Lighting)
  429. Effect.BrickColor = bc("Deep orange")
  430. Effect.Transparency = 1
  431. Effect.Anchored = true
  432. Effect.CanCollide = false
  433. Effect.Material = "Neon"
  434. Effect.Shape = "Ball"
  435. Effect.Size = vt(5,5,5)
  436. local fire1 = Instance.new("Fire",Effect)
  437. fire1.Name = "Fire"
  438. fire1.Heat = 0
  439. fire1.Size = 30
  440. fire1.SecondaryColor = bc("Really black").Color
  441. fire1.Color = bc("Deep orange").Color
  442. local fire2 = Instance.new("Fire",Effect)
  443. fire2.Name = "Fire2"
  444. fire2.Heat = 0
  445. fire2.Size = 25
  446. fire2.SecondaryColor = bc("Really black").Color
  447. fire2.Color = bc("Neon orange").Color
  448.  
  449. function Explode(rad,par)
  450. local expart = Instance.new("Part",script.Parent)
  451. local expart2 = Instance.new("Part",script.Parent)
  452. local snd = Instance.new("Sound",expart)
  453. snd.SoundId = "rbxassetid://258057783"
  454. snd.Volume = 2.5
  455. local partMesh = Instance.new("SpecialMesh",expart)
  456. partMesh.MeshType = "Sphere"
  457. local partMesh2 = Instance.new("SpecialMesh",expart2)
  458. partMesh2.MeshType = "Sphere"
  459. local expld = Instance.new("Explosion", script.Parent)
  460. expld.BlastRadius = rad
  461. expld.Position = par.Position
  462. partMesh.Scale = vt(rad,rad,rad)
  463. expart.Size = vt(1,1,1)*1.5
  464. expart.Transparency = 0.5
  465. expart.Anchored = true
  466. expart.Material = "Neon"
  467. expart.BrickColor = bc("Deep orange")
  468. expart.CFrame = par.CFrame
  469. partMesh2.Scale = vt(rad,rad,rad)
  470. expart2.Size = vt(1.15,1.15,1.15)*1.5
  471. expart2.Transparency = 0.5
  472. expart2.Anchored = true
  473. expart2.Material = "Neon"
  474. expart2.BrickColor = bc("Bright orange")
  475. expart2.CFrame = par.CFrame
  476. snd:Play()
  477. for i = 0, 100 do
  478. expart.Transparency = expart.Transparency + 0.005
  479. partMesh.Scale = partMesh.Scale + vt(0.25,0.25,0.25)
  480. expart.CFrame = expart.CFrame
  481. expart2.Transparency = expart.Transparency + 0.005
  482. partMesh2.Scale = partMesh2.Scale + vt(0.25,0.25,0.25)
  483. expart2.CFrame = expart.CFrame
  484. wait(0)
  485. end
  486. snd.Parent = nil
  487. expart.Parent = nil
  488. expart2.Parent = nil
  489. expld.Parent = nil
  490. end
  491.  
  492. function Explode2(rad,par)
  493. local expart = Instance.new("Part",script.Parent)
  494. local expart2 = Instance.new("Part",script.Parent)
  495. local snd = Instance.new("Sound",expart)
  496. snd.SoundId = "rbxassetid://165969964"
  497. snd.Volume = 3
  498. local partMesh = Instance.new("SpecialMesh",expart)
  499. partMesh.MeshType = "Sphere"
  500. local partMesh2 = Instance.new("SpecialMesh",expart2)
  501. partMesh2.MeshType = "Sphere"
  502. local expld = Instance.new("Explosion", script.Parent)
  503. expld.BlastRadius = rad
  504. expld.Position = par.Position
  505. partMesh.Scale = vt(rad,rad,rad)
  506. expart.Size = vt(1,1,1)*1.5
  507. expart.Transparency = 0.5
  508. expart.Anchored = true
  509. expart.Material = "Neon"
  510. expart.BrickColor = bc("Deep orange")
  511. expart.CFrame = par.CFrame
  512. partMesh2.Scale = vt(rad,rad,rad)
  513. expart2.Size = vt(1.15,1.15,1.15)*1.5
  514. expart2.Transparency = 0.5
  515. expart2.Anchored = true
  516. expart2.Material = "Neon"
  517. expart2.BrickColor = bc("Bright orange")
  518. expart2.CFrame = par.CFrame
  519. snd:Play()
  520. for i = 0, 100 do
  521. expart.Transparency = expart.Transparency + 0.005
  522. partMesh.Scale = partMesh.Scale + vt(0.25,0.25,0.25)
  523. expart.CFrame = expart.CFrame
  524. expart2.Transparency = expart.Transparency + 0.005
  525. partMesh2.Scale = partMesh2.Scale + vt(0.25,0.25,0.25)
  526. expart2.CFrame = expart.CFrame
  527. wait(0)
  528. end
  529. snd.Parent = nil
  530. expart.Parent = nil
  531. expart2.Parent = nil
  532. expld.Parent = nil
  533. end
  534.  
  535. mouse.KeyDown:connect(function(k)
  536.  
  537. k = k:lower()
  538. if k == "q" then
  539. local spart = Effect:Clone()
  540. spart.Parent = game.Players.LocalPlayer.Character
  541. spart.Transparency = 0
  542. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*5
  543. wait()
  544. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*15
  545. wait()
  546. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*25
  547. wait()
  548. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*35
  549. wait()
  550. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*45
  551. wait()
  552. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*55
  553. wait()
  554. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*65
  555. wait()
  556. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*75
  557. wait()
  558. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*85
  559. wait()
  560. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*95
  561. wait()
  562. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*105
  563. spart.Transparency = 1
  564. spart.Fire2:Destroy()
  565. spart.Fire:Destroy()
  566. Explode(25,spart)
  567. spart:Destroy()
  568. end
  569. if k == "e" then
  570. local spart = Effect:Clone()
  571. spart.Parent = game.Players.LocalPlayer.Character
  572. spart.Transparency = 0
  573. spart.Anchored = false
  574. spart.Position = game.Players.LocalPlayer.Character.Torso.Position + game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*0
  575. spart.Position = spart.Position + vt(0,100,0)
  576. spart.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*150
  577. wait(1)
  578. spart.Transparency = 1
  579. spart.Fire2:Destroy()
  580. spart.Fire:Destroy()
  581. Explode2(75,spart)
  582. spart:Destroy()
  583. end
  584. if k == "r" then
  585. local ff = Instance.new("ForceField",game.Players.LocalPlayer.Character)
  586. game.Players.LocalPlayer.Character.Torso.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*275
  587. wait(0.75)
  588. game.Players.LocalPlayer.Character.Torso.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector*-165
  589. Explode(30,game.Players.LocalPlayer.Character.Torso)
  590. wait(0.5)
  591. ff:Destroy()
  592. end
  593. if k == "f" then
  594. local ff = Instance.new("ForceField",game.Players.LocalPlayer.Character)
  595. for i = 0, 10 do
  596. game.Players.LocalPlayer.Character.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame + Vector3.new(0,10,0)
  597. wait(0)
  598. end
  599. for i = 0, 5 do
  600. game.Players.LocalPlayer.Character.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame + Vector3.new(0,1,0)
  601. wait(0)
  602. end
  603. game.Players.LocalPlayer.Character.Torso.Anchored = true
  604. wait(1.5)
  605. game.Players.LocalPlayer.Character.Torso.Anchored = false
  606. for i = 0, 10 do
  607. game.Players.LocalPlayer.Character.Torso.CFrame = game.Players.LocalPlayer.Character.Torso.CFrame + Vector3.new(0,-1,0)
  608. wait(0)
  609. end
  610. wait(0.25)
  611. Explode2(62.5,game.Players.LocalPlayer.Character.Torso)
  612. wait(0.5)
  613. ff:Destroy()
  614. end
  615. end)
  616.  
  617. local time = tick()
  618.  
  619. local plr = game:GetService("Players").LocalPlayer
  620. local mouse,char = plr:GetMouse(),plr.Character
  621.  
  622. local amountGhosts = 5
  623.  
  624. for i,v in pairs(game:GetService("Workspace").CurrentCamera:GetChildren()) do v:Destroy() end
  625.  
  626. local toggle,cd,mcd = false,false,false
  627. local ghosts = {}
  628. local temptab = {}
  629.  
  630. char:WaitForChild("Animate"):Destroy()
  631. char.Humanoid:WaitForChild("Animator"):Destroy()
  632.  
  633. local state = "idle"
  634.  
  635. local gt = false
  636.  
  637. local gyro = Instance.new("BodyGyro",char:WaitForChild("HumanoidRootPart")) --Stops the character from glitching out on enter/exit
  638. gyro.MaxTorque = Vector3.new(0,0,0)
  639. gyro.D = 0
  640. gyro.P = 100000000
  641.  
  642.  
  643. local wCol = BrickColor.new("Really red")
  644. local wCol2 = BrickColor.new("Really black")
  645. local gCol = BrickColor.new("Toothpaste")
  646. local gCol2 = BrickColor.new("Institutional white")
  647.  
  648. function searchAll(m,clear)
  649. if clear then
  650. if clear == true then
  651. for i,v in pairs(temptab) do
  652. table.remove(temptab,1)
  653. end
  654. end
  655. end
  656. for i,v in pairs(m:GetChildren()) do
  657. if v then
  658. local s = v:Clone()
  659. for _,b in pairs(s:GetChildren()) do
  660. b:Destroy()
  661. end
  662. if s:IsA("Part") or s:IsA("WedgePart") or s:IsA("TrussPart") or s:IsA("UnionOperation") then
  663. if s.Name ~= "HumanoidRootPart" then
  664. s.Anchored = true
  665. s.CanCollide = false
  666. s.Transparency = 0.95
  667. s.TopSurface = "Smooth"
  668. s.BottomSurface = "Smooth"
  669. s.FrontSurface = "Smooth"
  670. s.RightSurface = "Smooth"
  671. s.BackSurface = "Smooth"
  672. s.LeftSurface = "Smooth"
  673. if s.Material ~= Enum.Material.Neon then
  674. if gt == true then
  675. s.BrickColor = wCol2
  676. else
  677. s.BrickColor = gCol2
  678. end
  679. else
  680. if gt == true then
  681. s.BrickColor = wCol
  682. else
  683. s.BrickColor = gCol
  684. end
  685. end
  686. for _,c in pairs(v:GetChildren()) do
  687. if c:IsA("SpecialMesh") or c:IsA("CylinderMesh") then
  688. c:Clone().Parent = s
  689. end
  690. end
  691. local objValue = Instance.new("ObjectValue",s)
  692. objValue.Name = "Target"
  693. objValue.Value = v
  694. table.insert(temptab,s)
  695. end
  696. --elseif s:IsA("CharacterMesh") then
  697. --table.insert(temptab,s)
  698. end
  699. --searchAll(v)
  700. end
  701. end
  702. return temptab
  703. end
  704.  
  705. function CreateGhost()
  706. local ghost = Instance.new("Model",game.Workspace)
  707. searchAll(char,true)
  708. ghost.Name = char.Name.."'s Ghost "..#ghosts..#plr.Name
  709. --Instance.new("Humanoid",ghost)
  710. for i,v in pairs(temptab) do
  711. v:Clone().Parent = ghost
  712. end
  713. table.insert(ghosts,ghost)
  714. end
  715.  
  716. function ClearGhosts()
  717. for i,v in pairs(ghosts) do
  718. v:Destroy()
  719. end
  720. for i,v in pairs(ghosts) do
  721. table.remove(ghosts,1)
  722. end
  723. for i,v in pairs(game:GetService("Workspace"):GetChildren()) do
  724. if string.sub(v.Name,1,#plr.Name+9) == plr.Name.."'s Ghost " then
  725. v:Destroy()
  726. end
  727. end
  728. end
  729.  
  730. Instance.new("ForceField",char).Visible = false
  731.  
  732. local e1 = Instance.new("Part",char)
  733. e1.Size = Vector3.new(0.2,0.2,0.2)
  734. e1.TopSurface = "Smooth"
  735. e1.BottomSurface = "Smooth"
  736. e1.Material = "Neon"
  737. e1.Transparency = 1
  738. e1.Anchored = true
  739. e1.CanCollide = false
  740. e1.BrickColor = gCol
  741. e1.CFrame = char.Head.CFrame * CFrame.new(0.15,0.1,-0.6)
  742. local em1 = Instance.new("SpecialMesh",e1)
  743. em1.MeshType = "Sphere"
  744. local e2 = Instance.new("Part",char)
  745. e2.Size = Vector3.new(0.2,0.2,0.2)
  746. e2.TopSurface = "Smooth"
  747. e2.BottomSurface = "Smooth"
  748. e2.Transparency = 1
  749. e2.Material = "Neon"
  750. e2.Anchored = true
  751. e2.CanCollide = false
  752. e2.BrickColor = gCol
  753. e2.CFrame = char.Head.CFrame * CFrame.new(-0.15,0.1,-0.6)
  754. local em2 = Instance.new("SpecialMesh",e2)
  755. em2.MeshType = "Sphere"
  756.  
  757. toggle = true
  758. for i=1,amountGhosts do
  759. CreateGhost()
  760. end
  761. char.Parent = game:GetService("Workspace").CurrentCamera
  762. char:FindFirstChild("Head").Transparency = 1
  763. char:FindFirstChild("Torso").Transparency = 1
  764. char:FindFirstChild("Right Arm").Transparency = 1
  765. char:FindFirstChild("Left Arm").Transparency = 1
  766. char:FindFirstChild("Right Leg").Transparency = 1
  767. char:FindFirstChild("Left Leg").Transparency = 1
  768. for i,v in pairs(char:GetChildren()) do
  769. if v:IsA("Accessory") then
  770. v:FindFirstChild("Handle").Transparency = 1
  771. end
  772. end
  773. char:FindFirstChild("Head"):FindFirstChild("face"):Destroy()
  774.  
  775. local p1 = Instance.new("Part",workspace)
  776. local m1 = Instance.new("SpecialMesh",p1)
  777. m1.MeshType = "Sphere"
  778. m1.Scale = Vector3.new(5,5,5)
  779. p1.Size = Vector3.new(1,1,1)
  780. p1.Anchored = true
  781. p1.CanCollide = false
  782. p1.TopSurface = "Smooth"
  783. p1.BottomSurface = "Smooth"
  784. p1.BrickColor = gCol
  785. p1.Material = "Neon"
  786. local p2 = Instance.new("Part",workspace)
  787. local m2 = Instance.new("SpecialMesh",p2)
  788. m2.MeshType = "Sphere"
  789. m2.Scale = Vector3.new(8,8,8)
  790. p2.Size = Vector3.new(1,1,1)
  791. p2.Anchored = true
  792. p2.CanCollide = false
  793. p2.TopSurface = "Smooth"
  794. p2.BottomSurface = "Smooth"
  795. p2.BrickColor = gCol2
  796. p2.Material = "Neon"
  797. local p3 = Instance.new("Part",workspace)
  798. local m3 = Instance.new("BlockMesh",p3)
  799. m3.Scale = Vector3.new(7,7,7)
  800. p3.Size = Vector3.new(1,1,1)
  801. p3.Transparency = 0.4
  802. p3.Anchored = true
  803. p3.CanCollide = false
  804. p3.TopSurface = "Smooth"
  805. p3.BottomSurface = "Smooth"
  806. p3.BrickColor = gCol
  807. p3.Material = "Neon"
  808. local p4 = Instance.new("Part",workspace)
  809. local m4 = Instance.new("BlockMesh",p4)
  810. m4.Scale = Vector3.new(10,10,10)
  811. p4.Size = Vector3.new(1,1,1)
  812. p4.Transparency = 0.4
  813. p4.Anchored = true
  814. p4.CanCollide = false
  815. p4.TopSurface = "Smooth"
  816. p4.BottomSurface = "Smooth"
  817. p4.BrickColor = gCol2
  818. p4.Material = "Neon"
  819. local currentframe = 0
  820. local frmR
  821.  
  822. frmR = game:GetService("RunService").RenderStepped:connect(function()
  823. currentframe = currentframe + 1
  824. if currentframe < 1*60 then
  825. p1.CFrame = char:WaitForChild("Torso").CFrame
  826. p2.CFrame = char:WaitForChild("Torso").CFrame
  827. p3.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  828. p4.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  829. m1.Scale = m1.Scale + Vector3.new(0.25,0.25,0.25)
  830. m2.Scale = m2.Scale + Vector3.new(0.25,0.25,0.25)
  831. m3.Scale = m3.Scale + Vector3.new(0.25,0.25,0.25)
  832. m4.Scale = m4.Scale + Vector3.new(0.25,0.25,0.25)
  833. p1.Transparency = p1.Transparency + (1/(1*60))
  834. p2.Transparency = p2.Transparency + (1/(1*60))
  835. p3.Transparency = p3.Transparency + (1/(1*60))
  836. p4.Transparency = p4.Transparency + (1/(1*60))
  837. else
  838. p1:Destroy()
  839. p2:Destroy()
  840. p3:Destroy()
  841. p4:Destroy()
  842. frmR:disconnect()
  843. end
  844. end)
  845.  
  846. char.Humanoid.MaxHealth = math.huge
  847. wait()
  848. char.Humanoid.Health = math.huge
  849.  
  850. --[[mouse.KeyDown:connect(function(key)
  851. if key == "r" then
  852. print("R!")
  853. if cd == false then
  854. print("No cooldown!")
  855. cd = true
  856. if toggle == false then
  857. print("Entering godmode")
  858. toggle = true
  859. Instance.new("ForceField",char)
  860. for i=1,amountGhosts do
  861. CreateGhost()
  862. end
  863. char.Parent = game:GetService("Workspace").CurrentCamera
  864. char:FindFirstChild("Head").Transparency = 1
  865. char:FindFirstChild("Torso").Transparency = 1
  866. char:FindFirstChild("Right Arm").Transparency = 1
  867. char:FindFirstChild("Left Arm").Transparency = 1
  868. char:FindFirstChild("Right Leg").Transparency = 1
  869. char:FindFirstChild("Left Leg").Transparency = 1
  870. for i,v in pairs(char:GetChildren()) do
  871. if v:IsA("Accessory") then
  872. v:FindFirstChild("Handle").Transparency = 1
  873. end
  874. end
  875. else
  876. print("Exiting godmode")
  877. toggle = false
  878. for i,v in pairs(ghosts) do
  879. v:Destroy()
  880. end
  881. char.Parent = game:GetService("Workspace")
  882. char:FindFirstChild("ForceField"):Destroy()
  883. char:FindFirstChild("Head").Transparency = 0
  884. char:FindFirstChild("Torso").Transparency = 0
  885. char:FindFirstChild("Right Arm").Transparency = 0
  886. char:FindFirstChild("Left Arm").Transparency = 0
  887. char:FindFirstChild("Right Leg").Transparency = 0
  888. char:FindFirstChild("Left Leg").Transparency = 0
  889. for i,v in pairs(char:GetChildren()) do
  890. if v:IsA("Accessory") then
  891. v:FindFirstChild("Handle").Transparency = 0
  892. end
  893. end
  894. end
  895. cd = false
  896. end
  897. end
  898. end)]]
  899.  
  900. mouse.KeyDown:connect(function(key)
  901. spawn(function()
  902. if key == "f" and toggle == true and mcd == false then
  903. if #ghosts < amountGhosts then
  904. print(#ghosts.."<")
  905. mcd = true
  906.  
  907. ClearGhosts()
  908.  
  909. for i=1,amountGhosts do
  910. CreateGhost()
  911. end
  912. local p1 = Instance.new("Part",workspace)
  913. local m1 = Instance.new("SpecialMesh",p1)
  914. m1.MeshType = "Sphere"
  915. m1.Scale = Vector3.new(7,7,7)
  916. p1.Size = Vector3.new(1,1,1)
  917. p1.Anchored = true
  918. p1.CanCollide = false
  919. p1.TopSurface = "Smooth"
  920. p1.BottomSurface = "Smooth"
  921. if gt == false then
  922. p1.BrickColor = gCol
  923. else
  924. p1.BrickColor = wCol
  925. end
  926. p1.Material = "Neon"
  927. local p2 = Instance.new("Part",workspace)
  928. local m2 = Instance.new("SpecialMesh",p2)
  929. m2.MeshType = "Sphere"
  930. m2.Scale = Vector3.new(9,9,9)
  931. p2.Size = Vector3.new(1,1,1)
  932. p2.Anchored = true
  933. p2.CanCollide = false
  934. p2.TopSurface = "Smooth"
  935. p2.BottomSurface = "Smooth"
  936. if gt == false then
  937. p2.BrickColor = gCol2
  938. else
  939. p2.BrickColor = wCol2
  940. end
  941. p2.Material = "Neon"
  942. local currentframe = 0
  943. local frmR
  944.  
  945. frmR = game:GetService("RunService").RenderStepped:connect(function()
  946. currentframe = currentframe + 1
  947. if currentframe < 0.25*60 then
  948. p1.CFrame = char:WaitForChild("Torso").CFrame
  949. p2.CFrame = char:WaitForChild("Torso").CFrame
  950. p1.Transparency = p1.Transparency + (1/(0.25*60))
  951. p2.Transparency = p2.Transparency + (1/(0.25*60))
  952. else
  953. p1:Destroy()
  954. p2:Destroy()
  955. mcd = false
  956. frmR:disconnect()
  957. end
  958. end)
  959. else
  960. mcd = true
  961.  
  962. ClearGhosts()
  963.  
  964. local p1 = Instance.new("Part",workspace)
  965. local m1 = Instance.new("SpecialMesh",p1)
  966. m1.MeshType = "Sphere"
  967. m1.Scale = Vector3.new(7,7,7)
  968. p1.Size = Vector3.new(1,1,1)
  969. p1.Anchored = true
  970. p1.CanCollide = false
  971. p1.TopSurface = "Smooth"
  972. p1.BottomSurface = "Smooth"
  973. if gt == false then
  974. p1.BrickColor = gCol
  975. else
  976. p1.BrickColor = wCol
  977. end
  978. p1.Material = "Neon"
  979. local p2 = Instance.new("Part",workspace)
  980. local m2 = Instance.new("SpecialMesh",p2)
  981. m2.MeshType = "Sphere"
  982. m2.Scale = Vector3.new(9,9,9)
  983. p2.Size = Vector3.new(1,1,1)
  984. p2.Anchored = true
  985. p2.CanCollide = false
  986. p2.TopSurface = "Smooth"
  987. p2.BottomSurface = "Smooth"
  988. if gt == false then
  989. p2.BrickColor = gCol2
  990. else
  991. p2.BrickColor = wCol2
  992. end
  993. p2.Material = "Neon"
  994. local currentframe = 0
  995. local frmR
  996.  
  997. frmR = game:GetService("RunService").RenderStepped:connect(function()
  998. currentframe = currentframe + 1
  999. if currentframe < 0.25*60 then
  1000. p1.CFrame = char:WaitForChild("Torso").CFrame
  1001. p2.CFrame = char:WaitForChild("Torso").CFrame
  1002. p1.Transparency = p1.Transparency + (1/(0.25*60))
  1003. p2.Transparency = p2.Transparency + (1/(0.25*60))
  1004. else
  1005. p1:Destroy()
  1006. p2:Destroy()
  1007. mcd = false
  1008. frmR:disconnect()
  1009. end
  1010. end)
  1011. end
  1012. elseif key == "g" and toggle == true and mcd == false then
  1013. if gt == true then
  1014. gt = false
  1015. local p1 = Instance.new("Part",workspace)
  1016. local m1 = Instance.new("SpecialMesh",p1)
  1017. m1.MeshType = "Sphere"
  1018. m1.Scale = Vector3.new(5,5,5)
  1019. p1.Size = Vector3.new(1,1,1)
  1020. p1.Anchored = true
  1021. p1.CanCollide = false
  1022. p1.TopSurface = "Smooth"
  1023. p1.BottomSurface = "Smooth"
  1024. p1.BrickColor = gCol
  1025. p1.Material = "Neon"
  1026. local p2 = Instance.new("Part",workspace)
  1027. local m2 = Instance.new("SpecialMesh",p2)
  1028. m2.MeshType = "Sphere"
  1029. m2.Scale = Vector3.new(8,8,8)
  1030. p2.Size = Vector3.new(1,1,1)
  1031. p2.Anchored = true
  1032. p2.CanCollide = false
  1033. p2.TopSurface = "Smooth"
  1034. p2.BottomSurface = "Smooth"
  1035. p2.BrickColor = gCol2
  1036. p2.Material = "Neon"
  1037. local p3 = Instance.new("Part",workspace)
  1038. local m3 = Instance.new("BlockMesh",p3)
  1039. m3.Scale = Vector3.new(7,7,7)
  1040. p3.Size = Vector3.new(1,1,1)
  1041. p3.Transparency = 0.4
  1042. p3.Anchored = true
  1043. p3.CanCollide = false
  1044. p3.TopSurface = "Smooth"
  1045. p3.BottomSurface = "Smooth"
  1046. p3.BrickColor = gCol
  1047. p3.Material = "Neon"
  1048. local p4 = Instance.new("Part",workspace)
  1049. local m4 = Instance.new("BlockMesh",p4)
  1050. m4.Scale = Vector3.new(10,10,10)
  1051. p4.Size = Vector3.new(1,1,1)
  1052. p4.Transparency = 0.4
  1053. p4.Anchored = true
  1054. p4.CanCollide = false
  1055. p4.TopSurface = "Smooth"
  1056. p4.BottomSurface = "Smooth"
  1057. p4.BrickColor = gCol2
  1058. p4.Material = "Neon"
  1059.  
  1060. ClearGhosts()
  1061.  
  1062. for i=1,amountGhosts do
  1063. CreateGhost()
  1064. end
  1065.  
  1066. local currentframe = 0
  1067. local frmR
  1068.  
  1069. frmR = game:GetService("RunService").RenderStepped:connect(function()
  1070. currentframe = currentframe + 1
  1071. if currentframe < 1*60 then
  1072. p1.CFrame = char:WaitForChild("Torso").CFrame
  1073. p2.CFrame = char:WaitForChild("Torso").CFrame
  1074. p3.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  1075. p4.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  1076. m1.Scale = m1.Scale + Vector3.new(0.25,0.25,0.25)
  1077. m2.Scale = m2.Scale + Vector3.new(0.25,0.25,0.25)
  1078. m3.Scale = m3.Scale + Vector3.new(0.25,0.25,0.25)
  1079. m4.Scale = m4.Scale + Vector3.new(0.25,0.25,0.25)
  1080. p1.Transparency = p1.Transparency + (1/(1*60))
  1081. p2.Transparency = p2.Transparency + (1/(1*60))
  1082. p3.Transparency = p3.Transparency + (1/(1*60))
  1083. p4.Transparency = p4.Transparency + (1/(1*60))
  1084. else
  1085. p1:Destroy()
  1086. p2:Destroy()
  1087. p3:Destroy()
  1088. p4:Destroy()
  1089. frmR:disconnect()
  1090. end
  1091. end)
  1092. else
  1093. gt = true
  1094. local p1 = Instance.new("Part",workspace)
  1095. local m1 = Instance.new("SpecialMesh",p1)
  1096. m1.MeshType = "Sphere"
  1097. m1.Scale = Vector3.new(5,5,5)
  1098. p1.Size = Vector3.new(1,1,1)
  1099. p1.Anchored = true
  1100. p1.CanCollide = false
  1101. p1.TopSurface = "Smooth"
  1102. p1.BottomSurface = "Smooth"
  1103. p1.BrickColor = wCol
  1104. p1.Material = "Neon"
  1105. local p2 = Instance.new("Part",workspace)
  1106. local m2 = Instance.new("SpecialMesh",p2)
  1107. m2.MeshType = "Sphere"
  1108. m2.Scale = Vector3.new(8,8,8)
  1109. p2.Size = Vector3.new(1,1,1)
  1110. p2.Anchored = true
  1111. p2.CanCollide = false
  1112. p2.TopSurface = "Smooth"
  1113. p2.BottomSurface = "Smooth"
  1114. p2.BrickColor = wCol2
  1115. p2.Material = "Neon"
  1116. local p3 = Instance.new("Part",workspace)
  1117. local m3 = Instance.new("BlockMesh",p3)
  1118. m3.Scale = Vector3.new(7,7,7)
  1119. p3.Size = Vector3.new(1,1,1)
  1120. p3.Transparency = 0.4
  1121. p3.Anchored = true
  1122. p3.CanCollide = false
  1123. p3.TopSurface = "Smooth"
  1124. p3.BottomSurface = "Smooth"
  1125. p3.BrickColor = wCol
  1126. p3.Material = "Neon"
  1127. local p4 = Instance.new("Part",workspace)
  1128. local m4 = Instance.new("BlockMesh",p4)
  1129. m4.Scale = Vector3.new(10,10,10)
  1130. p4.Size = Vector3.new(1,1,1)
  1131. p4.Transparency = 0.4
  1132. p4.Anchored = true
  1133. p4.CanCollide = false
  1134. p4.TopSurface = "Smooth"
  1135. p4.BottomSurface = "Smooth"
  1136. p4.BrickColor = wCol2
  1137. p4.Material = "Neon"
  1138.  
  1139. ClearGhosts()
  1140.  
  1141. for i=1,amountGhosts do
  1142. CreateGhost()
  1143. end
  1144.  
  1145. local currentframe = 0
  1146. local frmR
  1147.  
  1148. frmR = game:GetService("RunService").RenderStepped:connect(function()
  1149. currentframe = currentframe + 1
  1150. if currentframe < 1*60 then
  1151. p1.CFrame = char:WaitForChild("Torso").CFrame
  1152. p2.CFrame = char:WaitForChild("Torso").CFrame
  1153. p3.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  1154. p4.CFrame = char:WaitForChild("Torso").CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  1155. m1.Scale = m1.Scale + Vector3.new(0.25,0.25,0.25)
  1156. m2.Scale = m2.Scale + Vector3.new(0.25,0.25,0.25)
  1157. m3.Scale = m3.Scale + Vector3.new(0.25,0.25,0.25)
  1158. m4.Scale = m4.Scale + Vector3.new(0.25,0.25,0.25)
  1159. p1.Transparency = p1.Transparency + (1/(1*60))
  1160. p2.Transparency = p2.Transparency + (1/(1*60))
  1161. p3.Transparency = p3.Transparency + (1/(1*60))
  1162. p4.Transparency = p4.Transparency + (1/(1*60))
  1163. else
  1164. p1:Destroy()
  1165. p2:Destroy()
  1166. p3:Destroy()
  1167. p4:Destroy()
  1168. frmR:disconnect()
  1169. end
  1170. end)
  1171. end
  1172. end
  1173. end)
  1174. end)
  1175.  
  1176. local frm = 0
  1177.  
  1178. local toRemove = {}
  1179.  
  1180. game:GetService("RunService").RenderStepped:connect(function()
  1181. frm = frm + 1
  1182. if char.Parent == game:GetService("Workspace").CurrentCamera then
  1183.  
  1184. e1.CFrame = char.Head.CFrame * CFrame.new(0.15,0.1,-0.55)
  1185. e2.CFrame = char.Head.CFrame * CFrame.new(-0.15,0.1,-0.55)
  1186.  
  1187. local delay = 0.9
  1188.  
  1189. for i,v in pairs(ghosts) do
  1190. for _,b in pairs(v:GetChildren()) do
  1191. if b:IsA("Part") or b:IsA("WedgePart") or b:IsA("TrussPart") or b:IsA("UnionOperation") then
  1192. b.CFrame = b.CFrame:lerp(b:FindFirstChild("Target").Value.CFrame,delay)
  1193. end
  1194. end
  1195. delay = delay - (0.5/(#ghosts+1))
  1196. end
  1197.  
  1198. --[[if math.floor(frm/8) == frm/8 then
  1199. local isub = 0
  1200. for i,v in pairs(ghosts) do
  1201. if #v:GetChildren() < 6 then
  1202. v:Destroy()
  1203. table.remove(ghosts,i - isub)
  1204. isub = isub + 1
  1205. CreateGhost()
  1206. end
  1207. end
  1208. end]]
  1209. end
  1210.  
  1211. --Animation states
  1212.  
  1213. local ray = Ray.new(char.HumanoidRootPart.CFrame.p, Vector3.new(0,-3,0).unit*4)
  1214. local part,pos,normal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(ray,ghosts,false,true)
  1215.  
  1216. if state ~= "busy" then
  1217. if char.HumanoidRootPart.Velocity.Magnitude <= 0.5 then
  1218. state = "idle"
  1219. elseif char.HumanoidRootPart.Velocity.Magnitude > 0.5 then
  1220. state = "running"
  1221. --[[elseif char.HumanoidRootPart.Velocity.Y < 0.1 and not part then
  1222. state = "falling"
  1223. elseif char.HumanoidRootPart.Velocity.Y >= 0.1 and not part then
  1224. state = "jumping"]]
  1225. end
  1226. char.Humanoid.WalkSpeed = 50
  1227. char.Humanoid.JumpPower = 70
  1228. end
  1229.  
  1230. --Actual animations
  1231.  
  1232. if state == "idle" then
  1233. char.HumanoidRootPart.RootJoint.C0 = char.HumanoidRootPart.RootJoint.C0:lerp(CFrame.new(0,1 + (math.cos(tick())/5),0) * CFrame.Angles(math.rad(80 + math.cos(tick())*4),math.rad(180),math.rad(0)),0.06)
  1234. char.Torso["Right Hip"].C0 = char.Torso["Right Hip"].C0:lerp(CFrame.new(0.5,-0.1 + (math.cos((tick())*2)/10),-0.2) * CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0)),0.06)
  1235. char.Torso["Left Hip"].C0 = char.Torso["Left Hip"].C0:lerp(CFrame.new(-0.5,-0.5 + (math.cos((tick()-0.5)*2)/6),0.3) * CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)),0.06)
  1236. char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:lerp(CFrame.new(1.5,0.43 + (math.cos((tick()-0.5)*1.5)/30),-0.6) * CFrame.Angles(math.rad(math.cos((tick())*2)*10),math.rad(0),math.rad(math.cos(tick()/3)*3)),0.06)
  1237. char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:lerp(CFrame.new(-1.5,0.3 + (math.cos((tick()-0.5)*1.5)/30),-0.6) * CFrame.Angles(math.rad(-15 + math.cos((tick()))*7),math.rad(0),math.rad(math.cos(tick()/2)*4)),0.06)
  1238. char.Torso.Neck.C0 = char.Torso.Neck.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(math.rad(90 + math.cos(tick()*1.5)*6),math.rad(180),math.rad(0)),0.06)
  1239. elseif state == "running" then
  1240. char.HumanoidRootPart.RootJoint.C0 = char.HumanoidRootPart.RootJoint.C0:lerp(CFrame.new(0,1 + (math.cos(tick())/5),0) * CFrame.Angles(math.rad(65 + math.cos(tick())*4),math.rad(180),math.rad(-char.HumanoidRootPart.RotVelocity.Y*10)),0.06)
  1241. char.Torso["Right Hip"].C0 = char.Torso["Right Hip"].C0:lerp(CFrame.new(0.5,-0.1 + (math.cos((tick())*2)/10),-0.2) * CFrame.Angles(math.rad(-20),math.rad(0),math.rad(0)),0.06)
  1242. char.Torso["Left Hip"].C0 = char.Torso["Left Hip"].C0:lerp(CFrame.new(-0.5,-0.5 + (math.cos((tick()-0.5)*2)/6),0.3) * CFrame.Angles(math.rad(-10),math.rad(0),math.rad(0)),0.06)
  1243. char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0:lerp(CFrame.new(1.5,0.70 + (math.cos((tick()-0.5)*1.5)/30),-0.4) * CFrame.Angles(math.rad(50 + math.cos((tick())*2)*10),math.rad(0),math.rad(math.cos(tick()/3)*3)),0.06)
  1244. char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0:lerp(CFrame.new(-1.5,0.3 + (math.cos((tick()-0.5)*1.5)/30),-0.4) * CFrame.Angles(math.rad(-35 + math.cos((tick()))*7),math.rad(0),math.rad(math.cos(tick()/2)*4)),0.06)
  1245. char.Torso.Neck.C0 = char.Torso.Neck.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(math.rad(90 + math.cos(tick()*1.5)*6),math.rad(180),math.rad(0)),0.06)
  1246. end
  1247. end)
  1248.  
  1249. char.Humanoid.Died:connect(function()
  1250. toggle = false
  1251.  
  1252. ClearGhosts()
  1253.  
  1254. char.Parent = game.Workspace
  1255. char.Parent = game:GetService("Workspace")
  1256. char:FindFirstChild("ForceField"):Destroy()
  1257. char:FindFirstChild("Head").Transparency = 0
  1258. char:FindFirstChild("Torso").Transparency = 0
  1259. char:FindFirstChild("Right Arm").Transparency = 0
  1260. char:FindFirstChild("Left Arm").Transparency = 0
  1261. char:FindFirstChild("Right Leg").Transparency = 0
  1262. char:FindFirstChild("Left Leg").Transparency = 0
  1263. for i,v in pairs(char:GetChildren()) do
  1264. if v:IsA("Accessory") then
  1265. v:FindFirstChild("Handle").Transparency = 0
  1266. end
  1267. end
  1268. for i,v in pairs(game:GetService("Workspace").CurrentCamera:GetChildren()) do v:Destroy() end
  1269. plr:LoadCharacter()
  1270. end)
  1271.  
  1272. local msgidGlob = 0
  1273. local state = true
  1274. local font = "Arcade"
  1275. local tcol = Color3.fromRGB(255,217,0)
  1276. local tscol = Color3.fromRGB(0,0,0)
  1277. local fsiz = 28
  1278. local tr = true
  1279. local tsr = false
  1280. local fade = 2
  1281.  
  1282. local p = Instance.new("Part",game.Workspace)
  1283. p.Size = Vector3.new(0.2,0.2,0.2)
  1284. p.Transparency = 1
  1285. p.Anchored = true
  1286. p.CanCollide = false
  1287. p.Name = "Msg"
  1288. p.CFrame = plr.Character:WaitForChild("Head").CFrame + Vector3.new(0,2.25,0)
  1289.  
  1290. local r = 255
  1291. local b = 0
  1292. local g = 0
  1293.  
  1294. plr.Chatted:connect(function(c)
  1295. msgidGlob = msgidGlob + 1
  1296. local curMsgId = msgidGlob
  1297. if string.lower(c) == "!disable" then
  1298. state = false
  1299. elseif string.lower(c) == "!enable" then
  1300. state = true
  1301. elseif string.lower(string.sub(c,1,6)) == "!font " then
  1302. local old = font
  1303. font = string.sub(c,7,#c) or old
  1304. elseif string.lower(string.sub(c,1,8)) == "!tcolor " then
  1305. if string.lower(string.sub(c,9,#c)) == "rainbow" then
  1306. tr = true
  1307. else
  1308. tr = false
  1309. local old = tcol
  1310. tcol = Color3.fromRGB(string.sub(c,9,11),string.sub(c,13,15),string.sub(c,17,19)) or old
  1311. end
  1312. elseif string.lower(string.sub(c,1,9)) == "!tscolor " then
  1313. if string.sub(c,10,#c) == "rainbow" then
  1314. tsr = true
  1315. else
  1316. tsr = false
  1317. local old = tscol
  1318. tscol = Color3.fromRGB(string.sub(c,10,12),string.sub(c,14,16),string.sub(c,18,20)) or old
  1319. end
  1320. elseif string.lower(string.sub(c,1,6)) == "!size " then
  1321. local old = fsiz
  1322. fsiz = string.sub(c,7,#c) or old
  1323. elseif string.lower(string.sub(c,1,6)) == "!fade " then
  1324. local old = fade
  1325. fade = string.sub(c,7,#c) or old
  1326. end
  1327. if plr.Character and state == true then
  1328. if plr.Character:FindFirstChild("Head") then
  1329. for i,v in pairs(p:GetChildren()) do
  1330. if v:IsA("BillboardGui") and v.Name == "J2CMSG" then
  1331. v:Destroy()
  1332. end
  1333. end
  1334. local bbgui = Instance.new("BillboardGui",p)
  1335. bbgui.Name = "J2CMSG"
  1336. bbgui.AlwaysOnTop = true
  1337. bbgui.ExtentsOffsetWorldSpace = Vector3.new(0,4.5,0)
  1338. bbgui.Size = UDim2.new(0.2,0,0.14,0)
  1339. local tl = Instance.new("TextLabel",bbgui)
  1340. tl.BackgroundTransparency = 1
  1341. tl.BorderSizePixel = 0
  1342. tl.Size = UDim2.new(1,0,10,0)
  1343. tl.Position = UDim2.new(0,0,-5,0)
  1344. tl.Font = font or "SciFi"
  1345. tl.FontSize = "Size"..fsiz or "Size36"
  1346. tl.TextColor3 = tcol
  1347. tl.TextScaled = false
  1348. tl.TextWrapped = false
  1349. tl.TextStrokeColor3 = tscol
  1350. tl.TextStrokeTransparency = 0
  1351.  
  1352. game:GetService("RunService").RenderStepped:connect(function()
  1353. if tr then
  1354. if tl.Parent ~= nil then
  1355. tl.TextColor3 = Color3.fromRGB(r,g,b)
  1356. end
  1357. end
  1358. end)
  1359.  
  1360. for i=1,#c do
  1361. if msgidGlob == curMsgId then
  1362. tl.Text = string.sub(c,1,i)
  1363. if string.sub(c,i,i) ~= " " then
  1364. local s = Instance.new("Sound",p)
  1365. s.SoundId = "rbxassetid://418252437"
  1366. s.Volume = 1
  1367. s.Pitch = 1
  1368. s:Play()
  1369. game.Debris:AddItem(s,2)
  1370. end
  1371. wait()
  1372. end
  1373. end
  1374. wait(fade)
  1375. if msgidGlob == curMsgId then
  1376. for i=1,10 do
  1377. if msgidGlob == curMsgId then
  1378. tl.TextTransparency = tl.TextTransparency + 0.1
  1379. tl.TextStrokeTransparency = tl.TextStrokeTransparency + 0.1
  1380. tl.Position = tl.Position + UDim2.new(0,0,0,-3)
  1381. wait()
  1382. end
  1383. end
  1384. if msgidGlob == curMsgId then
  1385. bbgui:Destroy()
  1386. end
  1387. end
  1388. end
  1389. end
  1390. end)
  1391.  
  1392. coroutine.resume(coroutine.create(function()
  1393. while wait() do
  1394. for i=0,255,10 do g = i wait() end
  1395. for i=255,0,-10 do r = i wait() end
  1396. for i=0,255,10 do b = i wait() end
  1397. for i=255,0,-10 do g = i wait() end
  1398. for i=0,255,10 do r = i wait() end
  1399. for i=255,0,-10 do b = i wait() end
  1400. end
  1401. end))
  1402.  
  1403. game:GetService("RunService").RenderStepped:connect(function()
  1404. if p.Parent ~= nil then
  1405. p.CFrame = p.CFrame:lerp(plr.Character:WaitForChild("Head").CFrame + Vector3.new(0,2.25,0),0.16)
  1406. else
  1407. p = Instance.new("Part",game.Workspace)
  1408. p.Size = Vector3.new(0.2,0.2,0.2)
  1409. p.Transparency = 1
  1410. p.Anchored = true
  1411. p.CanCollide = false
  1412. p.Name = "Msg"
  1413. p.CFrame = plr.Character:WaitForChild("Head").CFrame + Vector3.new(0,2.25,0)
  1414. end
  1415. end)
  1416.  
  1417. print("Ghost loaded! Time elapsed: "..tick() - time)
Add Comment
Please, Sign In to add comment