Advertisement
doryna2281337

Untitled

Aug 20th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.17 KB | None | 0 0
  1. wait(0.5)
  2. local Player = game:service'Players'.LocalPlayer
  3. local EpicName = Player.Name
  4. local repStorage= game:GetService("ReplicatedStorage")
  5. wait(1)
  6. script.Parent = game:GetService("ServerScriptService")
  7. local MainFolder = Instance.new("Folder")
  8. MainFolder.Name = Player.Name
  9. MainFolder.Parent = repStorage
  10.  
  11. Player.Character.Archivable = true
  12. local NC = Player.Character:Clone()
  13. NC.Animate:Destroy()
  14. NC.Humanoid.Animator:Destroy()
  15. FF = Instance.new("ForceField")
  16. FF.Visible = false
  17. FF.Parent = NC
  18. NC.Parent = MainFolder
  19.  
  20. local Mouse = Instance.new("RemoteEvent")
  21. Mouse.Name = "Mouse"
  22. Mouse.Parent = MainFolder
  23. local MouseInfo = script.MouseInfo
  24. MouseInfo.Parent = MainFolder
  25.  
  26. local SyncFolder = Instance.new("Folder")
  27. SyncFolder.Name = "Sync"
  28. SyncFolder.Parent = MainFolder
  29.  
  30. local mPos = Instance.new("CFrameValue")
  31. mPos.Name = "mHit"
  32. mPos.Parent = MainFolder
  33.  
  34. local mTarget = Instance.new("ObjectValue")
  35. mTarget.Name = "mTarget"
  36. mTarget.Parent = MainFolder
  37.  
  38. local LoopType = Instance.new("StringValue")
  39. LoopType.Name = "LoopType"
  40. LoopType.Value = "Custom"
  41. LoopType.Parent = MainFolder
  42.  
  43. local Mode = Instance.new("StringValue")
  44. Mode.Value = "Slap"
  45. Mode.Name = "Mode"
  46. Mode.Parent = MainFolder
  47.  
  48. local MoveType = Instance.new("StringValue")
  49. MoveType.Name = "MoveType"
  50. MoveType.Value = "Smooth"
  51. MoveType.Parent = MainFolder
  52.  
  53. local Movement = Instance.new("RemoteEvent")
  54. Movement.Name = "Movement"
  55. Movement.Parent = MainFolder
  56.  
  57. local DamageRemote = Instance.new("RemoteEvent")
  58. DamageRemote.Name = "DamageRemote"
  59. DamageRemote.Parent = MainFolder
  60.  
  61. local WeldRemote = Instance.new("RemoteFunction")
  62. WeldRemote.Name = "WeldRemote"
  63. WeldRemote.Parent = MainFolder
  64.  
  65. local StopRemote = Instance.new("RemoteEvent")
  66. StopRemote.Name = "StopRemote"
  67. StopRemote.Parent = MainFolder
  68.  
  69. for i,v in pairs(workspace.Terrain:GetChildren()) do
  70. if v.Name == Player.Name.." tracker" then
  71. v:Destroy()
  72. end
  73. end
  74.  
  75. local RealRoot = Instance.new("Part")
  76. RealRoot.Name = Player.Name.." tracker"
  77. RealRoot.CanCollide = false
  78. RealRoot.Size = NC.HumanoidRootPart.Size
  79. RealRoot.Transparency = 1
  80. RealRoot.Parent = workspace.Terrain
  81. local NV = Instance.new("BodyVelocity")
  82. NV.Name = "DontMoveMeNoob"
  83. NV.Velocity = Vector3.new(0,0,0)
  84. NV.Parent = RealRoot
  85. NV.Changed:Connect(function(v, v2)
  86. if tostring(v) == "Velocity" then
  87. if v2 ~= Vector3.new(0,0,0) then
  88. NV.Velocity = Vector3.new(0,0,0)
  89. end
  90. end
  91. end)
  92. RealRoot:SetNetworkOwner(Player)
  93.  
  94. for i,v in pairs(MouseInfo:GetChildren()) do
  95. v.OnServerEvent:Connect(function(plr, Position, TARG)
  96. mPos.Value = Position
  97. mTarget.Value = TARG
  98. end)
  99. end
  100.  
  101. Mouse.OnServerEvent:Connect(function(plr, request, ...)
  102. Mouse:FireAllClients(request, ...)
  103. end)
  104.  
  105. --[[ Functions --
  106.  
  107. -- SAZERENOS' ARTIFICIAL HEARTBEAT --]]
  108. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  109.  
  110. ArtificialHB = Instance.new("BindableEvent", script)
  111. ArtificialHB.Name = "ArtificialHB"
  112.  
  113. script:WaitForChild("ArtificialHB")
  114.  
  115. frame = Frame_Speed
  116. tf = 0
  117. allowframeloss = false
  118. tossremainder = false
  119. lastframe = tick()
  120. script.ArtificialHB:Fire()
  121.  
  122. game:GetService("RunService").Heartbeat:connect(function(s, p)
  123. tf = tf + s
  124. if tf >= frame then
  125. if allowframeloss then
  126. script.ArtificialHB:Fire()
  127. lastframe = tick()
  128. else
  129. for i = 1, math.floor(tf / frame) do
  130. script.ArtificialHB:Fire()
  131. end
  132. lastframe = tick()
  133. end
  134. if tossremainder then
  135. tf = 0
  136. else
  137. tf = tf - frame * math.floor(tf / frame)
  138. end
  139. end
  140. end)
  141.  
  142. function Swait(NUMBER)
  143. if NUMBER == 0 or NUMBER == nil then
  144. ArtificialHB.Event:wait()
  145. else
  146. for i = 1, NUMBER do
  147. ArtificialHB.Event:wait()
  148. end
  149. end
  150. end
  151.  
  152. function ChangeLoop(Text)
  153. print(Text)
  154. if Text == "Server" then
  155. LoopType.Value = "Server"
  156. elseif Text == "Custom" then
  157. LoopType.Value = "Custom"
  158. elseif Text == "Heartbeat" then
  159. LoopType.Value = "Heartbeat"
  160. elseif Text == "Stepped" then
  161. LoopType.Value = "Stepped"
  162. elseif Text == "RenderStepped" then
  163. LoopType.Value = "RenderStepped"
  164. else
  165. print("LoopType Invalid")
  166. end
  167. end
  168.  
  169. function ChangeMovement(Text)
  170. print(Text)
  171. if Text == "Smooth" then
  172. MoveType.Value = "Smooth"
  173. elseif Text == "Remote" then
  174. MoveType.Value = "Remote"
  175. else
  176. print("MoveType Invalid")
  177. end
  178. end
  179.  
  180. Player.Chatted:Connect(function(msg)
  181. if string.sub(msg,1,9) == "LoopType/" then
  182. ChangeLoop(string.sub(msg, 10))
  183. end
  184. if string.sub(msg,1,9) == "MoveType/" then
  185. ChangeMovement(string.sub(msg, 10))
  186. end
  187. if msg == "~stopscript" then
  188. StopRemote:FireAllClients()
  189. wait()
  190. MainFolder:Remove()
  191. script:Remove()
  192. script.Disabled = true
  193. end
  194. end)
  195.  
  196. game:GetService("Players").PlayerAdded:Connect(function(plr)
  197. if plr.Name == EpicName then
  198. plr.Chatted:Connect(function(msg)
  199. if string.sub(msg,1,9) == "LoopType/" then
  200. ChangeLoop(string.sub(msg, 10))
  201. end
  202. if string.sub(msg,1,9) == "MoveType/" then
  203. ChangeMovement(string.sub(msg, 10))
  204. end
  205. if msg == "~stopscript" then
  206. StopRemote:FireAllClients()
  207. wait()
  208. MainFolder:Remove()
  209. script:Remove()
  210. script.Disabled = true
  211. end
  212. end)
  213. end
  214. end)
  215.  
  216. -- Damage Functions --
  217.  
  218. function Damage(v)
  219. v.MaxHealth = 100
  220. v.Health = v.Health - 10
  221. end
  222.  
  223. function NewMode(v, v2)
  224. Mode.Value = v
  225. DamageRemote:FireAllClients("Mode", v2)
  226. end
  227.  
  228. DamageRemote.OnServerEvent:Connect(function(plr, request, ...)
  229. if request == "Mode" then
  230. NewMode(...)
  231. end
  232. if request == "Damage" then
  233. Damage(...)
  234. end
  235. if request == "Ban" or request == "BruhDimension" then
  236. DamageRemote:FireAllClients(request, ...)
  237. end
  238. end)
  239.  
  240. -- Other --
  241.  
  242. Movement.OnServerEvent:Connect(function(plr, ...)
  243. Movement:FireAllClients(...)
  244. end)
  245.  
  246. local newWeld=function(name,p0,p1,c0,c1)
  247. local w=Instance.new('Weld',p0)
  248. w.Name=name
  249. w.Part0=p0
  250. w.Part1=p1
  251. w.C0=c0
  252. w.C1=c1
  253. return w
  254. end
  255.  
  256. WeldRemote.OnServerInvoke = newWeld
  257.  
  258. -- End Functions --
  259.  
  260. script.Holder.Name = Player.Name
  261. for i,v in pairs(game:GetService("Players"):GetChildren()) do
  262. local NS = script[Player.Name]:Clone()
  263. NS.Parent = v.PlayerGui
  264. end
  265.  
  266. game.Players.PlayerAdded:Connect(function(plr)
  267. repeat Swait() until plr.Character
  268. local NS = script[Player.Name]:Clone()
  269. NS.Parent = plr:WaitForChild("PlayerGui")
  270. end)
  271.  
  272. -- Synced Loop
  273.  
  274. print("Running Server")
  275.  
  276. script.Parent = game:GetService("ServerScriptService")
  277.  
  278. workspace.Terrain.ChildRemoved:Connect(function(v)
  279. Swait(2)
  280. if v == RealRoot then
  281. RealRoot = Instance.new("Part")
  282. RealRoot.Name = Player.Name.." tracker"
  283. RealRoot.CanCollide = false
  284. RealRoot.Size = NC.HumanoidRootPart.Size
  285. RealRoot.Transparency = 1
  286. RealRoot.Parent = workspace.Terrain
  287. NV = Instance.new("BodyVelocity")
  288. NV.Name = "DontMoveMeNoob"
  289. NV.Velocity = Vector3.new(0,0,0)
  290. NV.Parent = RealRoot
  291. NV.Changed:Connect(function(v, v2)
  292. if tostring(v) == "Velocity" then
  293. if v2 ~= Vector3.new(0,0,0) then
  294. NV.Velocity = Vector3.new(0,0,0)
  295. end
  296. end
  297. end)
  298. RealRoot:SetNetworkOwner(Player)
  299. end
  300. end)
  301.  
  302. ArtificialHB.Event:Connect(function()
  303. Player.Character.HumanoidRootPart.CFrame = CFrame.new(10000,10000,0)
  304. end)
  305.  
  306. while true do
  307. ArtificialHB.Event:wait()
  308. local NI = Instance.new("Shirt")
  309. NI.Parent = SyncFolder
  310. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement