Hugo1234cool

Untitled

Mar 22nd, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.44 KB | None | 0 0
  1. plr = game.Players.LocalPlayer
  2. if game:GetService("RunService"):IsClient()then error("say h/ not hl/")end;print("LOADING... 99%");InternalData = {}
  3. do
  4. script.Parent = owner.Character
  5. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  6. local function NewFakeEvent()
  7. local Bind = Instance.new("BindableEvent")
  8. local Fake;Fake = {Connections = {},
  9. fakeEvent=true;
  10. Connect=function(self,Func)
  11. Bind.Event:connect(Func)
  12. self.Connections[Bind] = true
  13. return setmetatable({Connected = true},{
  14. __index = function (self,Index)
  15. if Index:lower() == "disconnect" then
  16. return function() Fake.Connections[Bind] = false;self.Connected = false end
  17. end
  18. return Fake[Index]
  19. end;
  20. __tostring = function() return "Connection" end;
  21. })
  22. end}
  23. Fake.connect = Fake.Connect;return Fake;
  24. end
  25. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  26. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  27. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  28. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  29. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  30. local function TriggerEvent(self,Event,...)
  31. local Trigger = Mouse[Event]
  32. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  33. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  34. end
  35. end
  36. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  37. Event.OnServerEvent:Connect(function(FiredBy,Input)
  38. if FiredBy.Name ~= owner.Name then return end
  39. if Input.MouseEvent then
  40. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  41. else
  42. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  43. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  44. for _,Action in pairs(ContextActionService.Actions) do
  45. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  46. end
  47. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  48. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  49. end
  50. end)
  51. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  52. Event.Parent = NLS([[
  53. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  54. local Input = function(Input,gameProcessedEvent)
  55. if gameProcessedEvent then return end
  56. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57. end
  58. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  59. local Hit,Target
  60. while wait(1/30) do
  61. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  62. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  63. end
  64. end
  65. ]],owner.Character)
  66. end
  67. RealGame = game;game = setmetatable({},{
  68. __index = function (self,Index)
  69. local Sandbox = function (Thing)
  70. if Thing:IsA("Player") then
  71. local RealPlayer = Thing
  72. return setmetatable({},{
  73. __index = function (self,Index)
  74. local Type = type(RealPlayer[Index])
  75. if Type == "function" then
  76. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  77. return function (self)return InternalData["Mouse"] end
  78. end
  79. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  80. end
  81. return RealPlayer[Index]
  82. end;
  83. __tostring = function(self) return RealPlayer.Name end
  84. })
  85. end
  86. end
  87. if RealGame[Index] then
  88. local Type = type(RealGame[Index])
  89. if Type == "function" then
  90. if Index:lower() == "getservice" or Index:lower() == "service" then
  91. return function (self,Service)
  92. local FakeServices = {
  93. ["players"] = function()
  94. return setmetatable({},{
  95. __index = function (self2,Index2)
  96. local RealService = RealGame:GetService(Service)
  97. local Type2 = type(Index2)
  98. if Type2 == "function" then
  99. return function (self,...) return RealService[Index2](RealService,...)end
  100. else
  101. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  102. return RealService[Index2]
  103. end
  104. end;
  105. __tostring = function(self) return RealGame:GetService(Service).Name end
  106. })
  107. end;
  108. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  109. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  110. ["runservice"] = function()
  111. return setmetatable({},{
  112. __index = function(self2,Index2)
  113. local RealService = RealGame:GetService(Service)
  114. local Type2 = type(Index2)
  115. if Type2 == "function" then
  116. return function (self,...) return RealService[Index2](RealService,...) end
  117. else
  118. local RunServices = {
  119. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  120. ["renderstepped"] = function() return RealService["Stepped"] end
  121. }
  122. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  123. return RealService[Index2]
  124. end
  125. end
  126. })
  127. end
  128. }
  129. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  130. return RealGame:GetService(Service)
  131. end
  132. end
  133. return function (self,...) return RealGame[Index](RealGame,...) end
  134. else
  135. if game:GetService(Index) then return game:GetService(Index) end
  136. return RealGame[Index]
  137. end
  138. end
  139. return nil
  140. end
  141. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("100%!")
  142. part = nil
  143. bp = nil
  144. particles = nil
  145. function clerp(a,b,c,d)
  146. for i = 0,d,.01 do
  147. a.CFrame = CFrame.new(b:lerp(c,i))
  148. wait()
  149. end
  150. end
  151. function slerp(a2,b2,c2,d2)
  152. for i2 = 0,d2,.01 do
  153. a2.CFrame = CFrame.new(b2:lerp(c2,i2))
  154. wait()
  155. end
  156. end
  157. mouse.KeyDown:connect(function(key)
  158. if key == "e" and plr.Character.Parent == workspace then
  159. plr.Character.Parent = workspace.Camera
  160. plr.Character.Archivable = true
  161. Instance.new("ForceField",plr.Character).Visible = false
  162. for y,t in pairs(plr.Character:GetChildren()) do
  163. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  164. t.Transparency = 1
  165. if t.Name == "Head" and t:FindFirstChild("face") then
  166. t.face.Transparency = 1
  167. end
  168. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  169. t.Handle.Transparency = 1
  170. end
  171. end
  172. elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
  173. plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p)
  174. elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
  175. if plr.Character.Torso.Anchored == true then
  176. for y,t in pairs(plr.Character:GetChildren()) do
  177. if t:IsA("Part") then
  178. t.Anchored = false
  179. end
  180. end
  181. else
  182. for y,t in pairs(plr.Character:GetChildren()) do
  183. if t:IsA("Part") then
  184. t.Anchored = true
  185. end
  186. end
  187. end
  188. elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
  189. local clone = part:Clone()
  190. clone.Parent = workspace
  191. clone.Anchored = false
  192. clone:ClearAllChildren()
  193. clone.CanCollide = true
  194. bp.Parent = clone
  195. particles.Parent = clone
  196. if part.Parent:FindFirstChildOfClass("Humanoid") then
  197. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  198. end
  199. part:Destroy()
  200. part = clone
  201. elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
  202. plr.Character.Parent = workspace
  203. plr.Character.Archivable = false
  204. plr.Character:FindFirstChildOfClass("ForceField"):Remove()
  205. for y,t in pairs(plr.Character:GetChildren()) do
  206. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  207. t.Transparency = 0
  208. if t.Name == "Head" and t:FindFirstChild("face") then
  209. t.face.Transparency = 0
  210. end
  211. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  212. t.Handle.Transparency = 0
  213. end
  214. end
  215. end
  216. end)
  217. mouse.Button1Down:connect(function()
  218. if plr.Character.Parent == workspace.Camera then
  219. if mouse ~= nil then
  220. if mouse.Target ~= nil then
  221. part = mouse.Target
  222. bp = Instance.new("BodyPosition",part)
  223. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  224. bp.Position = part.Position
  225. particles = Instance.new("ParticleEmitter",part)
  226. particles.Color = ColorSequence.new(Color3.new(0,0,0))
  227. particles.Size = NumberSequence.new(1)
  228. particles.Texture = "rbxassetid://292289455"
  229. particles.VelocitySpread = 360
  230. particles.Speed = NumberRange.new(0)
  231. particles.RotSpeed = NumberRange.new(0)
  232. particles.Rotation = NumberRange.new(0)
  233. particles.Rate = 250
  234. particles.Lifetime = NumberRange.new(.2,.4)
  235. particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
  236. dwn = true
  237. end
  238. end
  239. while dwn == true do
  240. wait()
  241. bp.Position = mouse.hit.p
  242. if part then
  243. if part.Parent:FindFirstChildOfClass("Humanoid") then
  244. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  245. end
  246. end
  247. end
  248. end
  249. end)
  250. mouse.Button1Up:connect(function()
  251. dwn = false
  252. if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
  253. if bp then bp:Destroy() end
  254. if particles then particles:Destroy() end
  255. end)
  256. base = Instance.new("ScreenGui",plr.PlayerGui)
  257. bbg = Instance.new("BillboardGui",plr.Character.Head)
  258. bbg.Size = UDim2.new(0,200,0,50)
  259. bbg.StudsOffset = Vector3.new(0,3,0)
  260. bbgTl = Instance.new("TextLabel",bbg)
  261. bbgTl.BackgroundTransparency = 1
  262. bbgTl.Size = UDim2.new(10,0,1,0)
  263. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  264. bbgTl.Font = "Code"
  265. bbgTl.Text = " "
  266. bbgTl.TextSize = 25
  267. bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
  268. bbgTl.TextColor3 = Color3.new(0,0,0)
  269. bbgTl.TextStrokeTransparency = 0
  270. bbgTl.TextWrapped = true
  271. plr.Chatted:connect(function(msg)
  272. bbgTl.Text = msg
  273. wait(5)
  274. if bbgTl.Text == msg then
  275. bbgTl.Text = " "
  276. end
  277. end)
  278. touchCounter = 0
  279. while wait() do
  280. if plr.Character.Parent == workspace.Camera then
  281. local c = plr.Character:Clone()
  282. c:MakeJoints()
  283. for y,t in pairs(c:GetChildren()) do
  284. if t:IsA("Part") then
  285. t.CanCollide = false
  286. t.Anchored = true
  287. t.Transparency = .5
  288. t.TopSurface = "Smooth"
  289. t.BottomSurface = "Smooth"
  290. t.RightSurface = "Smooth"
  291. t.LeftSurface = "Smooth"
  292. t.FrontSurface = "Smooth"
  293. t.BackSurface = "Smooth"
  294. t.BrickColor = BrickColor.new("Really black")
  295. if t.Name == "Head" and t:FindFirstChild("face") then
  296. t.face:Remove()
  297. elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
  298. t.roblox:Remove()
  299. elseif t.Name == "HumanoidRootPart" then
  300. t:Remove()
  301. end
  302. else
  303. t:Remove()
  304. end
  305. end
  306. c.Parent = workspace
  307. game.Debris:AddItem(c,.05)
  308. end
  309. end
Advertisement
Add Comment
Please, Sign In to add comment