Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.73 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("lol") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. local RealPlayer = RealPlayer
  6. script.Parent = RealPlayer.Character
  7.  
  8. --Fake event to make stuff like Mouse.KeyDown work
  9. local Disconnect_Function = function(this)
  10. this[1].Functions[this[2]] = nil
  11. end
  12. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  13. local FakeEvent_Metatable = {__index={
  14. Connect = function(this,f)
  15. local i = tostring(math.random(0,10000))
  16. while this.Functions[i] do
  17. i = tostring(math.random(0,10000))
  18. end
  19. this.Functions[i] = f
  20. return setmetatable({this,i},Disconnect_Metatable)
  21. end
  22. }}
  23. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  24. local function fakeEvent()
  25. return setmetatable({Functions={}},FakeEvent_Metatable)
  26. end
  27.  
  28. --Creating fake input objects with fake variables
  29. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  30. FakeMouse.keyUp = FakeMouse.KeyUp
  31. FakeMouse.keyDown = FakeMouse.KeyDown
  32. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  33. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  34. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  35. end}
  36. --Merged 2 functions into one by checking amount of arguments
  37. CAS.UnbindAction = CAS.BindAction
  38.  
  39. --This function will trigger the events that have been :Connect()'ed
  40. local function TriggerEvent(self,ev,...)
  41. for _,f in pairs(self[ev].Functions) do
  42. f(...)
  43. end
  44. end
  45. FakeMouse.TriggerEvent = TriggerEvent
  46. UIS.TriggerEvent = TriggerEvent
  47.  
  48. --Client communication
  49. local Event = Instance.new("RemoteEvent")
  50. Event.Name = "UserInput_Event"
  51. Event.OnServerEvent:Connect(function(plr,io)
  52. if plr~=RealPlayer then return end
  53. FakeMouse.Target = io.Target
  54. FakeMouse.Hit = io.Hit
  55. if not io.isMouse then
  56. local b = io.UserInputState == Enum.UserInputState.Begin
  57. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  58. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  59. end
  60. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  61. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  62. end
  63. for _,t in pairs(CAS.Actions) do
  64. for _,k in pairs(t.Keys) do
  65. if k==io.KeyCode then
  66. t.Function(t.Name,io.UserInputState,io)
  67. end
  68. end
  69. end
  70. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  71. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  72. end
  73. end)
  74. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  75. local Mouse = owner:GetMouse()
  76. local UIS = game:GetService("UserInputService")
  77. local input = function(io,RobloxHandled)
  78. if RobloxHandled then return end
  79. --Since InputObject is a client-side instance, we create and pass table instead
  80. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  81. end
  82. UIS.InputBegan:Connect(input)
  83. UIS.InputEnded:Connect(input)
  84.  
  85. local h,t
  86. --Give the server mouse data every second frame, but only if the values changed
  87. --If player is not moving their mouse, client won't fire events
  88. local HB = game:GetService("RunService").Heartbeat
  89. while true do
  90. if h~=Mouse.Hit or t~=Mouse.Target then
  91. h,t=Mouse.Hit,Mouse.Target
  92. Event:FireServer({isMouse=true,Target=t,Hit=h})
  93. end
  94. --Wait 2 frames
  95. for i=1,2 do
  96. HB:Wait()
  97. end
  98. end]==],script)
  99.  
  100. ----Sandboxed game object that allows the usage of client-side methods and services
  101. --Real game object
  102. local RealGame = game
  103.  
  104. --Metatable for fake service
  105. local FakeService_Metatable = {
  106. __index = function(self,k)
  107. local s = rawget(self,"_RealService")
  108. if s then
  109. return typeof(s[k])=="function"
  110. and function(_,...)return s[k](s,...)end or s[k]
  111. end
  112. end,
  113. __newindex = function(self,k,v)
  114. local s = rawget(self,"_RealService")
  115. if s then s[k]=v end
  116. end
  117. }
  118. local function FakeService(t,RealService)
  119. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  120. return setmetatable(t,FakeService_Metatable)
  121. end
  122.  
  123. --Fake game object
  124. local FakeGame = {
  125. GetService = function(self,s)
  126. return rawget(self,s) or RealGame:GetService(s)
  127. end,
  128. Players = FakeService({
  129. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  130. },"Players"),
  131. UserInputService = FakeService(UIS,"UserInputService"),
  132. ContextActionService = FakeService(CAS,"ContextActionService"),
  133. RunService = FakeService({
  134. _btrs = {},
  135. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  136. BindToRenderStep = function(self,name,_,fun)
  137. self._btrs[name] = self.Heartbeat:Connect(fun)
  138. end,
  139. UnbindFromRenderStep = function(self,name)
  140. self._btrs[name]:Disconnect()
  141. end,
  142. },"RunService")
  143. }
  144. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  145. FakeGame.service = FakeGame.GetService
  146. FakeService(FakeGame,game)
  147. --Changing owner to fake player object to support owner:GetMouse()
  148. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  149. end
  150.  
  151. if game.Players.LocalPlayer.Character:FindFirstChild("Body Colors") ~= nil then
  152. game.Players.LocalPlayer.Character:FindFirstChild("Body Colors").HeadColor = BrickColor.new("White")
  153. game.Players.LocalPlayer.Character:FindFirstChild("Body Colors").LeftArmColor = BrickColor.new("Really black")
  154. game.Players.LocalPlayer.Character:FindFirstChild("Body Colors").LeftLegColor = BrickColor.new("Really black")
  155. game.Players.LocalPlayer.Character:FindFirstChild("Body Colors").RightArmColor = BrickColor.new("Really black")
  156. game.Players.LocalPlayer.Character:FindFirstChild("Body Colors").RightLegColor = BrickColor.new("Really black")
  157. game.Players.LocalPlayer.Character:FindFirstChild("Body Colors").TorsoColor = BrickColor.new("Really black")
  158. end
  159.  
  160. BigTorso=Instance.new("SpecialMesh",game.Players.LocalPlayer.Character.Torso)
  161. BigTorso.Offset=Vector3.new(0,0,0)
  162. BigTorso.MeshType="Brick"
  163. BigTorso.Scale=Vector3.new(1,2,1)
  164.  
  165. a=game.Players.LocalPlayer.Character["Right Arm"]
  166. aa=game.Players.LocalPlayer.Character.Torso["Right Shoulder"]
  167. a.Size=Vector3.new(1,4,1)
  168. aa.C0 = CFrame.new(1.5,(a.Size.y/2)-0.5,0) * CFrame.Angles(0,math.pi/2,0)
  169. aa.C1 = CFrame.new(0,(a.Size.y/2)-0.5,0) * CFrame.Angles(0,math.pi/2,0)
  170. aa.Parent=game.Players.LocalPlayer.Character.Torso
  171.  
  172. b=game.Players.LocalPlayer.Character["Right Leg"]
  173. bb=game.Players.LocalPlayer.Character.Torso["Right Hip"]
  174. b.Size=Vector3.new(1,7,1)
  175. bb.C0 = CFrame.new(0.5,-b.Size.y/2+(BigTorso.Scale.y)-0.5,0) * CFrame.Angles(0,math.pi/2,0)
  176. bb.C1 = CFrame.new(0,b.Size.y/2,0) * CFrame.Angles(0,math.pi/2,0)
  177. bb.Parent=game.Players.LocalPlayer.Character.Torso
  178.  
  179. c=game.Players.LocalPlayer.Character["Left Arm"]
  180. cc=game.Players.LocalPlayer.Character.Torso["Left Shoulder"]
  181. c.Size=Vector3.new(1,4,1)
  182. cc.C0 = CFrame.new(-1.5,(c.Size.y/2)-0.5,0) * CFrame.Angles(0,-math.pi/2,0)
  183. cc.C1 = CFrame.new(0,(c.Size.y/2)-0.5,0) * CFrame.Angles(0,-math.pi/2,0)
  184. cc.Parent=game.Players.LocalPlayer.Character.Torso
  185.  
  186. d=game.Players.LocalPlayer.Character["Left Leg"]
  187. dd=game.Players.LocalPlayer.Character.Torso["Left Hip"]
  188. d.Size=Vector3.new(1,7,1)
  189. dd.C0 = CFrame.new(-0.5,-(d.Size.y/2)+(BigTorso.Scale.y)-0.5,0) * CFrame.Angles(0,-math.pi/2,0)
  190. dd.C1 = CFrame.new(0,d.Size.y/2,0) * CFrame.Angles(0,-math.pi/2,0)
  191. dd.Parent=game.Players.LocalPlayer.Character.Torso
  192.  
  193. e=game.Players.LocalPlayer.Character["Head"]
  194. ee=game.Players.LocalPlayer.Character.Torso["Neck"]
  195. ee.C0=CFrame.new(0,2,0,-1,-0,-0,0,0,1,0,1,0)
  196. ee.Parent=game.Players.LocalPlayer.Character.Torso
  197.  
  198.  
  199. v = game.Players.LocalPlayer
  200. coroutine.resume(coroutine.create(function()
  201. if v and v.Character and v.Character:findFirstChild("Head") then
  202. for c,b in pairs(v.Character:findFirstChild("Head"):GetChildren()) do
  203. if b.ClassName == "Decal" then
  204. b:Remove()
  205. end
  206. end
  207. for a, moda in pairs(v.Character:children()) do if moda:findFirstChild("NameTag") then v.Character.Head.Transparency = 0 moda:Destroy() end end
  208. local char = v.Character
  209. local moda = Instance.new("Model", char) moda.Name = "FHEAD"
  210. local cl = char.Head:Clone() cl.Transparency = 0 cl.Parent = moda cl.Name = "Head"
  211. local weld = Instance.new("Weld", cl) weld.Part0 = cl weld.Part1 = char.Head
  212. char.Head.Transparency = 1
  213. end
  214. end))
  215.  
  216. ab = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui)
  217. ab.Name = "Slender"
  218. abu = Instance.new("TextButton",ab)
  219. abu.Text = "Invisible"
  220. abu.Position = UDim2.new(0,0,1,-30)
  221. abu.Size = UDim2.new(0,100,0,30)
  222. abu.MouseButton1Click:connect(function()
  223. if abu.Text == "Invisible" then
  224. abu.Text = "Visible"
  225. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  226. if v.ClassName == "Part" then
  227. v.Transparency = 1
  228. elseif v.Name == "FHEAD" then
  229. v.Head.Transparency = 1
  230. end
  231. end
  232. elseif abu.Text == "Visible" then
  233. abu.Text = "Invisible"
  234. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  235. if v.ClassName == "Part" then
  236. if v.Name == "Head" or v.Name == "HumanoidRootPart" then else
  237. v.Transparency = 0
  238. end
  239. elseif v.Name == "FHEAD" then
  240. v.Head.Transparency = 0
  241. end
  242. end
  243. end
  244. end)
  245. mouse=game.Players.LocalPlayer:GetMouse()
  246. mouse.KeyDown:connect(function(key) local key=key:lower()
  247. if key=="g" then
  248. if abu.Text == "Invisible" then
  249. abu.Text = "Visible"
  250. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  251. if v.ClassName == "Part" then
  252. v.Transparency = 1
  253. elseif v.Name == "FHEAD" then
  254. v.Head.Transparency = 1
  255. end
  256. end
  257. elseif abu.Text == "Visible" then
  258. abu.Text = "Invisible"
  259. for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  260. if v.ClassName == "Part" then
  261. if v.Name == "Head" or v.Name == "HumanoidRootPart" then else
  262. v.Transparency = 0
  263. end
  264. elseif v.Name == "FHEAD" then
  265. v.Head.Transparency = 0
  266. end
  267. end
  268. end
  269. end
  270. end)
  271.  
  272.  
  273. local Player = game.Players.LocalPlayer
  274. local Mouse = Player:GetMouse()
  275. Mouse.KeyDown:connect(function(key)
  276. if key:byte() == 50 or key:byte() == 49 then
  277. if Mouse.Target ~= nil then
  278. Player.Character.HumanoidRootPart.CFrame = Mouse.Hit+Vector3.new(0,9,0)
  279. end
  280. end
  281. end)
  282.  
  283. while true do
  284. for i,a in pairs(game.Players:GetChildren()) do
  285. local v = a.Character
  286. if v:FindFirstChild('Humanoid') and v:FindFirstChild('HumanoidRootPart') and Player.Character:FindFirstChild('HumanoidRootPart') then
  287. if v ~= Player.Character then
  288. if (Player.Character.HumanoidRootPart.Position - v.HumanoidRootPart.Position).magnitude < 10 and Player.Character.Torso.Transparency ~= 1 then
  289. v.Humanoid.Health = 0
  290. end
  291. end
  292. end
  293. end
  294. wait()
  295. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement