plytalent

testing

Aug 18th, 2020 (edited)
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.28 KB | None | 0 0
  1. owner=game:GetService("Players"):FindFirstChild("plytalent")
  2. local remotes=Instance.new("Folder",owner.PlayerGui)
  3. remotes.Name = "ZafkielRemoteEvent"
  4. Heal = Instance.new("RemoteEvent",remotes)
  5. SetMaxHp = Instance.new("RemoteEvent",remotes)
  6. Position = Instance.new("RemoteEvent",remotes)
  7. Anchored = Instance.new("RemoteEvent",remotes)
  8. hbin = Instance.new("HopperBin",owner.Backpack)
  9. hbin.Name = "Zafkiel"
  10. Heal.OnServerEvent:Connect(function(plr,target,amount)
  11.     if plr.Name == "plytalent" then
  12.         if plr and target and amount then
  13.             if target then
  14.                 if target.Character:FindFirstChildOfClass("Humanoid") then
  15.                     local targethumanoid = target.Character:FindFirstChildOfClass("Humanoid")
  16.                     if targethumanoid.Health > 0 then
  17.                         if typeof(amount) == "number" then
  18.                             if amount > 0 then
  19.                                 targethumanoid.Health = targethumanoid.Health + amount
  20.                             end
  21.                         end
  22.                     end
  23.                 end
  24.             end
  25.         end
  26.     end
  27. end)
  28.  
  29. SetMaxHp.OnServerEvent:Connect(function(plr,target,amount)
  30.     if plr.Name == "plytalent" then
  31.         if plr and target and amount then
  32.             if target then
  33.                 if target.Character:FindFirstChildOfClass("Humanoid") then
  34.                     local targethumanoid = target.Character:FindFirstChildOfClass("Humanoid")
  35.                     if targethumanoid.Health > 0 then  
  36.                         if typeof(amount) == "number" then
  37.                             if amount > 0 then
  38.                                 targethumanoid.MaxHealth = amount
  39.                                 targethumanoid.Health = targethumanoid.Health + amount
  40.                             end
  41.                         end
  42.                     end
  43.                 end
  44.             end
  45.         end
  46.     end
  47. end)
  48. Position.OnServerEvent:Connect(function(plr,target,Cf)
  49.     if plr.Name == "plytalent" then
  50.         if target then
  51.             target.HumanoidRootPart.CFrame = Cf
  52.         end
  53.     end
  54. end)
  55. Anchored.OnServerEvent:Connect(function(plr,target,value)
  56.     if plr.Name == "plytalent" then
  57.         target = value
  58.     end
  59. end)
  60.  
  61. NLS([[local hopperbin = script.Parent
  62. local mouse_event = nil
  63. local subab = {}
  64. local subabevent = {}
  65. local plrs = game:GetService("Players")
  66. local plr = game:GetService("Players").LocalPlayer
  67. for i =1 , 8 do
  68.     subab[i] = Instance.new("HopperBin")
  69. end
  70. local Store ={Frames={},Hp={},MaxHp={},PositionAndOrientation={},Events={},rewinding={}}
  71. wait(3)
  72. local RemoteFolder = plr.PlayerGui.ZafkielRemoteEvent
  73. function startFramesCounter(targetplr)
  74.     local Frameindex = "Frames_"..targetplr.Name
  75.     local PositionAndOrientationIndex="CFrame_"..targetplr.Name
  76.     local MaxHpIndex ="MaxHealthPoint_"..targetplr.Name
  77.     local HpIndex = "HealthPoint_"..targetplr.Name
  78.     local BooleanIndexRewind = "GotRewindedTime_"..targetplr.Name
  79.     local EventIndex = "Events_"..targetplr.Name
  80.     Store.Frames[Frameindex] = 0
  81.     Store.PositionAndOrientation[PositionAndOrientationIndex] = {}
  82.     Store.MaxHp[MaxHpIndex] = {}
  83.     Store.Hp[HpIndex]={}
  84.     Store.rewinding[BooleanIndexRewind] = false
  85.     Store.Events[EventIndex]=game:GetService("RunService").RenderStepped:Connect(function()
  86.         if not Store.rewinding[BooleanIndexRewind] then
  87.             Store.Frames[Frameindex] = Store.Frames[Frameindex] + 1
  88.             Store.PositionAndOrientation[PositionAndOrientationIndex][Store.Frames[Frameindex] ]=targetplr.Character.HumanoidRootPart.CFrame
  89.             Store.MaxHp[MaxHpIndex][Store.Frames[Frameindex] ]=targetplr.Character:FindFirstChildOfClass("Humanoid").MaxHealth
  90.             Store.Hp[HpIndex][Store.Frames[Frameindex] ]=targetplr.Character:FindFirstChildOfClass("Humanoid").Health
  91.         end
  92.     end)
  93. end
  94. game:GetService("Players").PlayerAdded:Connect(startFramesCounter)
  95. game:GetService("Players").PlayerRemoving:Connect(function(removingplr)
  96.     local Frameindex = "Frames_"..removingplr.Name
  97.     local PositionAndOrientationIndex="CFrame_"..removingplr.Name
  98.     local MaxHpIndex ="MaxHealthPoint_"..removingplr.Name
  99.     local HpIndex = "HealthPoint_"..removingplr.Name
  100.     local EventIndex = "Events_"..removingplr.Name
  101.     Store.Events[EventIndex]:Disconnect()
  102.     Store.Events[EventIndex] = nil
  103.     Store.PositionAndOrientation[PositionAndOrientationIndex] = nil
  104.     Store.MaxHp[MaxHpIndex] = nil
  105.     Store.Hp[HpIndex]= nil
  106.     Store.Frames[Frameindex] = nil
  107. end)
  108. --startFramesCounter(game:GetService("Players").LocalPlayer)
  109. for _, v in pairs(game:GetService("Players"):GetPlayers())do
  110. startFramesCounter(v)
  111. end
  112. subab[1].Name = "Aleph" -- speed up external time (replace health script and add velocity to y ws)
  113. subab[2].Name = "Bet" -- Slow external time (replace health script and gravity ws decreases velocity y)
  114. subab[3].Name = "Gimmel" -- speed up internal time(replace health script)
  115. subab[4].Name = "Dalet" -- rewind time half done
  116. subab[5].Name = "Zayin" -- freeze time (loop anchors part)
  117. subab[6].Name = "Yud Bet" -- rewind time for n (store current CF and rewind after n teleport back to store CF)
  118. subab[7].Name = "Teleportation"
  119. subab[8].Name = "Back"
  120. function waitframe(frame)
  121.     for i = 1 , frame do
  122.         game:GetService("RunService").RenderStepped:Wait()
  123.     end
  124. end
  125. function ahhhh_it_rewind_time(targetplayer,targetframe)
  126.     targetframe = targetframe or 180
  127.     if not Store.rewinding["GotRewindedTime_"..targetplayer.Name] then
  128.         Store.rewinding["GotRewindedTime_"..targetplayer.Name] = true
  129.         local ws=targetplayer.Character:FindFirstChildOfClass("Humanoid").WalkSpeed
  130.         local jp=targetplayer.Character:FindFirstChildOfClass("Humanoid").JumpPower
  131.         if #Store.PositionAndOrientation["CFrame_"..targetplayer.Name] < targetframe then
  132.             targetframe = #Store.PositionAndOrientation["CFrame_"..targetplayer.Name]
  133.         end
  134.         index = #Store.PositionAndOrientation["CFrame_"..targetplayer.Name] - targetframe
  135.         if index < 1 then
  136.             index = 1
  137.         end
  138.         Store.Frames["Frames_"..targetplayer.Name] = index
  139.         RemoteFolder.Anchored:FireServer(targetplayer.Character.HumanoidRootPart,true)
  140.         --{targetpart,true or false}
  141.         wait(0.5)
  142.         for i= index+1,#Store.PositionAndOrientation["CFrame_"..targetplayer.Name] do
  143.             Store.PositionAndOrientation["CFrame_"..targetplayer.Name][i] = nil
  144.         end
  145.         --targetplayer.Character.Humanoid.WalkSpeed = ws*0.1
  146.         --targetplayer.Character.Humanoid.JumpPower = jp*0.1
  147.         RemoteFolder.Anchored:FireServer(targetplayer.Character.HumanoidRootPart,false)
  148.         --{targetpart,true or false}
  149.         RemoteFolder.Position:FireServer(targetplayer.Character,Store.PositionAndOrientation["CFrame_"..targetplayer.Name][index])
  150.         --{target,amount}
  151.         RemoteFolder.Heal:FireServer(targetplayer,Store.Hp["HealthPoint_"..targetplayer.Name][index])
  152.         -- {target,amount}
  153.         RemoteFolder.SetMaxHp:FireServer(targetplayer,Store.MaxHp["MaxHealthPoint_"..targetplayer.Name][index])
  154.         --{target,amount}
  155.         Store.rewinding["GotRewindedTime_"..targetplayer.Name] = false
  156.         Store.Frames["Frame_"..targetplayer.Name]=index
  157.         --coroutine.resume(coroutine.create(function()
  158.         --  waitframe(180)
  159.         --  targetplayer.Character.Humanoid.WalkSpeed = ws
  160.         --  targetplayer.Character.Humanoid.JumpPower = jp
  161.         --  print("Gain Normal Speed")
  162.         --end))
  163.     end
  164. end
  165.  
  166. hopperbin.Selected:Connect(function(playermouse)
  167.     mouse_event = playermouse.Button1Down:Connect(function()
  168.         print("PRESSED M1")
  169.         subab[1].Selected:Connect(function(m)
  170.             subabevent[1] = m.Button1Down:Connect(function()
  171. --          m.Button1Down:Connect(function()
  172.                 print("CALLED AB Aleph")
  173.             end)
  174.         end)
  175.         subab[2].Selected:Connect(function(m)
  176.             subabevent[3] = m.Button1Down:Connect(function()
  177. --          m.Button1Down:Connect(function()
  178.                 print("CALLED AB Bet")
  179.             end)
  180.         end)
  181.         subab[3].Selected:Connect(function(m)
  182.             subabevent[5] = m.Button1Down:Connect(function()
  183. --          m.Button1Down:Connect(function()
  184.                 print("CALLED AB Gimmel")
  185.             end)
  186.         end)
  187.         subab[4].Selected:Connect(function(m)
  188.             subabevent[7] = m.Button2Down:Connect(function()
  189. --          m.Button1Down:Connect(function()
  190.                 print("CALLED AB Dalet")
  191.                 --if cd.dalet <= 0 then
  192.                 --  cd.dalet = 3
  193.                     ahhhh_it_rewind_time(plr,180)
  194.                 --end
  195.             end)
  196.             subabevent[8] = m.Button1Down:Connect(function()
  197. --          m.Button1Down:Connect(function()
  198.                 print("CALLED AB Dalet")
  199.                 if m.Target.Parent then
  200.                     local marktarget=plrs:GetPlayerFromCharacter(m.Target.Parent)
  201.                     if marktarget then
  202.                         ahhhh_it_rewind_time(marktarget,180)
  203.                     end
  204.                 end
  205.             end)
  206.         end)
  207.         subab[5].Selected:Connect(function(m)
  208.             subabevent[9] = m.Button1Down:Connect(function()
  209. --          m.Button1Down:Connect(function()
  210.                 print("CALLED AB Zayin")
  211.             end)
  212.         end)
  213.         subab[6].Selected:Connect(function(m)
  214.             subabevent[11] = m.Button1Down:Connect(function()
  215. --          m.Button1Down:Connect(function()
  216.                 print("CALLED AB Yud Bet")
  217.             end)
  218.         end)
  219.         subab[7].Selected:Connect(function(m)
  220.             subabevent[13]= m.Button1Down:Connect(function()
  221.                 --m.Button1Down:Connect(function()
  222.                 dist=m.Hit
  223.                 print("CALLED AB Teleportation")
  224.                 Magnitude=(plr.Character.HumanoidRootPart.Position-dist.p).Magnitude
  225.                 if  Magnitude <= 7500 and  Magnitude >= -7500 then
  226.                     plr.Character.HumanoidRootPart.Anchored = true
  227.                     wait(1)
  228.                     plr.Character.HumanoidRootPart.CFrame = dist
  229.                     plr.Character.HumanoidRootPart.Anchored= false
  230.                 else
  231.                     print("ERR:TOO FAR")
  232.                 end
  233.             end)
  234.         end)
  235.         subab[8].Selected:Connect(function(m)
  236.             subabevent[15] = m.Button1Down:Connect(function()
  237. --          m.Button1Down:Connect(function()
  238.                 for i =1 , #subab do
  239.                     subab[i].Parent = nil
  240.                 end
  241.                 for i =1 , #subabevent do
  242.                     subabevent[i]:Disconnect()
  243.                 end
  244.             end)
  245.         end)
  246.         for i =1 , #subab do
  247.             subab[i].Parent = hopperbin.Parent
  248.         end
  249.     end)
  250. end)
  251. hopperbin.Deselected:Connect(function()
  252.     if mouse_event then
  253.         mouse_event:Disconnect()
  254.     end
  255. end)
  256. ]],hbin)
Add Comment
Please, Sign In to add comment