Advertisement
SHADOWCRAFTER666

dio

Oct 4th, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.23 KB | None | 0 0
  1. print("Loaded Successfully!")
  2. --[[Changeable Variables]]--
  3. local multiplier = 1 --Attack multiplier (default is 1)
  4. local soundlist = {
  5. HardHit1 = "rbxassetid://565207203",
  6. HardHit2 = "rbxassetid://541909913",
  7. HardHit3 = "rbxassetid://541909983",
  8. WeakHit1 = "rbxassetid://558642292",
  9. WeakHit2 = "rbxassetid://541907812",
  10. Slice1 = "rbxassetid://260429964",
  11. Slice2 = "rbxassetid://260430015",
  12. Explosion1 = "rbxassetid://138186576",
  13. Explosion2 = "rbxassetid://157878578",
  14. Woosh1 = "rbxassetid://541909867",
  15. Woosh2 = "rbxassetid://541909763",
  16. TimeSlow = "rbxassetid://615678808",
  17. TimeStop = "rbxassetid://926382097",
  18. TimeResume = "rbxassetid://894793352",
  19. TimeFast = "rbxassetid://743499393",
  20. TimeReverse = "rbxassetid://618737332",
  21.  
  22. }
  23.  
  24. --[[Important Variables]]--
  25. local plr = game:GetService('Players').LocalPlayer
  26. local char = plr.Character
  27. local mouse = plr:GetMouse()
  28. local input = game:GetService('UserInputService')
  29. ----
  30. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  31. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  32. local rs = torso["Right Shoulder"]
  33. local ls = torso["Left Shoulder"]
  34. local rh = torso["Right Hip"]
  35. local lh = torso["Left Hip"]
  36. local neck = torso.Neck
  37. local rj = rootpart["RootJoint"]
  38. ----
  39. local huge = Vector3.new(math.huge, math.huge, math.huge)
  40. local attacking = false
  41. local cananim = true
  42. local timestop = false
  43. local timeslow = false
  44. local timefast = false
  45. local reversing = false
  46. local unfreeze = {}
  47. local sounddata = {}
  48. local connections = {}
  49. local healthstuff = {}
  50.  
  51. --[[ Functions ]]--
  52. function addattack(keycode, func)
  53. input.InputBegan:connect(function(inp)
  54. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  55. func()
  56. end
  57. end)
  58. end
  59. function attackend(keycode, func)
  60. input.InputEnded:connect(function(inp)
  61. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  62. func()
  63. end
  64. end)
  65. end
  66. function swait(t)
  67. if t then
  68. for i = 0, t do
  69. game:GetService('RunService').Stepped:wait(0)
  70. end
  71. else
  72. game:GetService('RunService').Stepped:wait(0)
  73. end
  74. return true
  75. end
  76. function fade(obj, dest, grow)
  77. spawn(function()
  78. local oldcf = obj.CFrame
  79. for i = 0, 10 do
  80. if grow then
  81. obj.Size = obj.Size +Vector3.new(1,1,1)
  82. obj.CFrame = oldcf
  83. end
  84. obj.Transparency = obj.Transparency +0.1
  85. swait()
  86. end
  87. if dest then
  88. obj:Destroy()
  89. end
  90. end)
  91. end
  92. function replacejoint(name)
  93. local j = torso:FindFirstChild(name)
  94. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  95. if j then
  96. if true then
  97. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  98. local new = Instance.new("Weld")
  99. local c0 = j.C0
  100. local c1 = j.C1
  101. new.Part0 = j.Part0
  102. j.Part0 = nil
  103. new.Name = j.Name.." Replacement"
  104. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  105. new.Parent = j.Parent
  106. new.Part1 = j.Part1
  107. new.C0 = c0
  108. new.C1 = c1
  109. return new
  110. end
  111. end
  112. end
  113. function removejoint(name, fast)
  114. local j = torso:FindFirstChild(name.." Replacement")
  115. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  116. if j then
  117. local p0 = j.Part0
  118. if p0 ~= nil then
  119. local c0 = j.C0
  120. local c1 = j.C1
  121. j:Destroy()
  122. local new = p0:FindFirstChild(name)
  123. local ac0 = new.C0
  124. local ac1 = new.C1
  125. new.Part0 = p0
  126. new.C0 = c0
  127. new.C1 = c1
  128. spawn(function()
  129. if name ~= "RootJoint" then
  130. if not fast then
  131. for i = 0, 0.6, 0.1 do
  132. new.C0 = new.C0:Lerp(ac0, 0.5)
  133. new.C1 = new.C1:lerp(ac1, 0.5)
  134. swait()
  135. end
  136. else
  137. new.C0 = new.C0:Lerp(ac0, 1)
  138. new.C1 = new.C1:lerp(ac1, 1)
  139. end
  140. end
  141. end)
  142. end
  143. end
  144. end
  145. function fixalljoints(fast)
  146. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  147. removejoint(v, fast)
  148. end
  149. end
  150. function getnewjoints()
  151. local rs = replacejoint("Right Shoulder")
  152. local ls = replacejoint("Left Shoulder")
  153. local rh = replacejoint("Right Hip")
  154. local lh = replacejoint("Left Hip")
  155. local neck = replacejoint("Neck")
  156. local rj = replacejoint("RootJoint")
  157. return rs,ls,rh,lh,neck,rj
  158. end
  159. function knockback(hit, force)
  160. local bv = Instance.new("BodyVelocity")
  161. bv.MaxForce = huge
  162. bv.Velocity = force
  163. bv.Parent = hit
  164. game:GetService('Debris'):AddItem(bv, 0.15)
  165. end
  166. function soundeffect(id, volume, speed, parent, forcewait)
  167. local func = function()
  168. local s = LoadLibrary("RbxUtility").Create("Sound")()
  169. s.Name = "SoundEffect"
  170. s.Volume = volume
  171. s.PlaybackSpeed = speed
  172. s.SoundId = id
  173. s.Name = "dont"
  174. s.Looped = false
  175. s.Parent = parent
  176. s:Play()
  177. repeat wait() until not s.Playing
  178. s:Destroy()
  179. end
  180. if forcewait then
  181. func()
  182. else
  183. spawn(func)
  184. end
  185. end
  186. function getascendants(obj)
  187. local par = obj
  188. local ret = {}
  189. pcall(function()
  190. repeat
  191. par = par.Parent
  192. if par ~= nil then
  193. table.insert(ret, par)
  194. end
  195. until par == nil
  196. end)
  197. return ret
  198. end
  199. function findascendant(obj, class)
  200. local par = obj
  201. local ret = nil
  202. pcall(function()
  203. repeat
  204. par = par.Parent
  205. if par:IsA(class) then
  206. ret = par
  207. break
  208. end
  209. until par == nil
  210. end)
  211. return ret
  212. end
  213. function hurt(hit, dmg)
  214. --pcall(function()
  215. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  216. if hum then
  217. if hum.Parent ~= char then
  218. hum.Health = hum.Health - dmg
  219. hum.Health = hum.Health - dmg
  220. soundeffect(soundlist.Headshot, 1.5, 1, workspace.CurrentCamera)
  221. return true
  222. end
  223. end
  224. --end)
  225. end
  226. --[[ Actual script :OOOOOOOOOO ]]--
  227. addattack(Enum.KeyCode.G, function()
  228. if not timeslow and not timefast and not reversing then
  229. local p = Instance.new("Part")
  230. p.Anchored = true
  231. p.Material = "Glass"
  232. p.Size = Vector3.new(0.1,0.1,0.1)
  233. p.BrickColor = BrickColor.new("Toothpaste")
  234. p.CanCollide = false
  235. p.CFrame = char.HumanoidRootPart.CFrame
  236. local m = Instance.new("SpecialMesh")
  237. m.MeshType = "Sphere"
  238. m.Parent = p
  239. p.Parent = char
  240. spawn(function()
  241. for i = 1, 50 do
  242. p.Transparency = i/50
  243. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  244. p.CFrame = char.HumanoidRootPart.CFrame
  245. swait()
  246. end
  247. p:Destroy()
  248. end)
  249. if not timestop then
  250. local s = Instance.new("Sound")
  251. s.Volume = 3
  252. s.Name = "dont"
  253. s.SoundId = soundlist.TimeStop
  254. s.Parent = char
  255. s:Play()
  256. dcon = workspace.DescendantAdded:connect(function(obj)
  257. pcall(function()
  258. swait()
  259. local ok = true
  260. for i,v in pairs(getascendants(obj)) do
  261. if v.Name:lower():find("ignoremodel") then
  262. ok = false
  263. end
  264. end
  265. if obj:IsA("BasePart") and ok and not findascendant(obj, "Tool") and not findascendant(obj, "HopperBin") and not findascendant(obj, "Camera") then
  266. if not obj.Anchored and obj.Name ~= "HumanoidRootPart" then
  267. table.insert(unfreeze, obj)
  268. obj.Anchored = true
  269. end
  270. end
  271. if obj:IsA("Sound") and obj.Name ~= "dont" then
  272. if obj.Playing then
  273. obj:Pause()
  274. table.insert(unfreeze, obj)
  275. end
  276. if obj:IsA("Humanoid") then
  277. local last = obj.Health
  278. local always = last
  279. local con = obj.HealthChanged:connect(function(health)
  280. if last-health > 0 then
  281. table.insert(healthstuff, {hum = obj, change = last-health})
  282. end
  283. last = health
  284. obj.Health = always
  285. end)
  286. table.insert(connections, con)
  287. end
  288. end)
  289. end)
  290. for i,v in pairs(workspace:GetDescendants()) do
  291. pcall(function()
  292. if v:IsA("BasePart") then
  293. local ok = true
  294. for i,e in pairs(getascendants(v)) do
  295. if e.Name:lower():find("ignore_model") then
  296. ok = false
  297. end
  298. if e:IsA("Camera") then
  299. ok = false
  300. end
  301. end
  302. if not v.Anchored and ok and v.Parent ~= char and not findascendant(v, "Camera") and not findascendant(v, "Tool") and not findascendant(v, "HopperBin") then
  303. local ok = true
  304. if v.Parent:IsA("Accessory") then ok = false end
  305. if ok and v.Name ~= "HumanoidRootPart" then
  306. v.Anchored = true
  307. table.insert(unfreeze, v)
  308. end
  309. end
  310. end
  311. end)
  312. pcall(function()
  313. if v:IsA("Sound") and v.Name ~= "dont" then
  314. if v.Playing then
  315. v:Pause()
  316. table.insert(unfreeze, v)
  317. end
  318. end
  319. end)
  320. pcall(function()
  321. if v:IsA("Humanoid") then
  322. local last = v.Health
  323. local always = last
  324. local con = v.HealthChanged:connect(function(health)
  325. if last-health > 0 then
  326. table.insert(healthstuff, {hum = v, change = last-health})
  327. end
  328. last = health
  329. v.Health = always
  330. end)
  331. table.insert(connections, con)
  332. end
  333. end)
  334. end
  335. timestop = true
  336. game.Debris:AddItem(s, 2)
  337. else
  338. local s = Instance.new("Sound")
  339. s.Volume = 7
  340. s.Name = "dont"
  341. s.SoundId = soundlist.TimeResume
  342. s.Parent = char
  343. s:Play()
  344. end
  345. game.Debris:AddItem(s, 2)
  346. timestop = false
  347. for i,v in pairs(unfreeze) do
  348. pcall(function()
  349. v.Anchored = false
  350. end)
  351. pcall(function()
  352. v:Resume()
  353. end)
  354. end
  355. for i,v in pairs(connections) do
  356. pcall(function()
  357. v:disconnect()
  358. end)
  359. end
  360. for i,v in pairs(healthstuff) do
  361. pcall(function()
  362. local hum = v.hum
  363. hum.Health = hum.Health - v.change
  364. if hum.Parent:FindFirstChild("Health") then
  365. pcall(function()
  366. hum.Parent.Health.Disabled = false
  367. end)
  368. end
  369. end)
  370. end
  371. pcall(function()
  372. dcon:disconnect()
  373. end)
  374. healthstuff = {}
  375. unfreeze = {}
  376. end
  377. end
  378. end)
  379. local humanoiddata = {}
  380. local bodymoverdata = {}
  381. local dcon2
  382. local connectionsdata = {}
  383. addattack(Enum.KeyCode.H, function()
  384. if not timeslow and not timestop and not reversing then
  385. local p = Instance.new("Part")
  386. p.Anchored = true
  387. p.Material = "Glass"
  388. p.Size = Vector3.new(0.1,0.1,0.1)
  389. p.BrickColor = BrickColor.new("Toothpaste")
  390. p.CanCollide = false
  391. p.CFrame = char.HumanoidRootPart.CFrame
  392. local m = Instance.new("SpecialMesh")
  393. m.MeshType = "Sphere"
  394. m.Parent = p
  395. p.Parent = char
  396. spawn(function()
  397. for i = 1, 50 do
  398. p.Transparency = i/50
  399. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  400. p.CFrame = char.HumanoidRootPart.CFrame
  401. swait()
  402. end
  403. p:Destroy()
  404. end)
  405. if not timefast then
  406. timefast = true
  407. soundeffect(soundlist.TimeFast, 1.5, 1, char)
  408. for i,v in pairs(workspace:GetDescendants()) do
  409. if v:IsA("Humanoid") then
  410. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  411. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  412. end
  413. local con = v.AnimationPlayed:connect(function(track)
  414. end)
  415. table.insert(connections, con)
  416. end
  417. if v:IsA("BodyVelocity") then
  418. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  419. end
  420. if v:IsA("BodyPosition") then
  421. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  422. end
  423. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  424. end
  425. if v:IsA("Sound") and v.Name ~= "dont" then
  426. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  427. end
  428. end
  429. dcon2 = workspace.DescendantAdded:connect(function(v)
  430. swait(2)
  431. if v:IsA("Humanoid") then
  432. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  433. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  434. track:AdjustSpeed(1.4)
  435. end
  436. local con = v.AnimationPlayed:connect(function(track)
  437. track:AdjustSpeed(1.4)
  438. end)
  439. table.insert(connections, con)
  440. end
  441. if v:IsA("BodyVelocity") then
  442. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  443. end
  444. if v:IsA("BodyPosition") then
  445. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  446. end
  447. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  448. end
  449. if v:IsA("Sound") and v.Name ~= "dont" then
  450. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  451. end
  452. end)
  453. else
  454. timefast = false
  455. soundeffect(soundlist.TimeResume, 1.5, 1, char)
  456. for i,v in pairs(humanoiddata) do
  457. pcall(function()
  458. v["Hum"].WalkSpeed = v["WS"]
  459. v["Hum"].JumpPower = v["JP"]
  460. end)
  461. end
  462. for i,v in pairs(bodymoverdata) do
  463. pcall(function()
  464. if v["Mover"]:IsA("BodyVelocity") then
  465. v["Mover"].Velocity = v["Vel"]
  466. end
  467. if v["Mover"]:IsA("BodyPosition") then
  468. v["Mover"].P = v["Vel"]
  469. end
  470. end)
  471. end
  472. for i,v in pairs(sounddata) do
  473. pcall(function()
  474. v["Sound"].PlaybackSpeed = v["Speed"]
  475. end)
  476. end
  477. for i,v in pairs(connections) do
  478. pcall(function()
  479. v:disconnect()
  480. end)
  481. end
  482. connections = {}
  483. pcall(function()
  484. dcon2:disconnect()
  485. end)
  486. humanoiddata = {}
  487. end
  488. end
  489. end)
  490. local reversedata = {}
  491. local saved = false
  492. addattack(Enum.KeyCode.C, function()
  493. if not timestop and not timeslow and not timefast then
  494. if not saved then
  495. saved = true
  496. for i,v in pairs(workspace:GetDescendants()) do
  497. end
  498. else
  499. reversing = true
  500. saved = false
  501. soundeffect(soundlist.TimeReverse, 2, 1, workspace)
  502. for i = 1, 10 do
  503. for _,v in pairs(reversedata) do
  504. local obj = v.obj
  505. local cf = v.cf obj.Anchored = true
  506. end
  507. end
  508. swait()
  509. end
  510. char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  511. reversedata = {}
  512. reversing = false
  513. end
  514. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement