Hugo1234cool

Untitled

Feb 26th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.37 KB | None | 0 0
  1. plr =owner
  2. repeat wait() until plr.Character
  3. char = plr.Character
  4. --https://github.com/Mokiros/roblox-FE-compatibility
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,game,owner = owner,game
  7. local RealPlayer = Player
  8. do
  9. print("FE Compatibility code V2 by Mokiros")
  10. local RealPlayer = RealPlayer
  11. script.Parent = RealPlayer.Character
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local Disconnect_Function = function(this)
  15. this[1].Functions[this[2]] = nil
  16. end
  17. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  18. local FakeEvent_Metatable = {__index={
  19. Connect = function(this,f)
  20. local i = tostring(math.random(0,10000))
  21. while this.Functions[i] do
  22. i = tostring(math.random(0,10000))
  23. end
  24. this.Functions[i] = f
  25. return setmetatable({this,i},Disconnect_Metatable)
  26. end
  27. }}
  28. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  29. local function fakeEvent()
  30. return setmetatable({Functions={}},FakeEvent_Metatable)
  31. end
  32.  
  33. --Creating fake input objects with fake variables
  34. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  35. FakeMouse.keyUp = FakeMouse.KeyUp
  36. FakeMouse.keyDown = FakeMouse.KeyDown
  37. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  38. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  39. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  40. end}
  41. --Merged 2 functions into one by checking amount of arguments
  42. CAS.UnbindAction = CAS.BindAction
  43.  
  44. --This function will trigger the events that have been :Connect()'ed
  45. local function TriggerEvent(self,ev,...)
  46. for _,f in pairs(self[ev].Functions) do
  47. f(...)
  48. end
  49. end
  50. FakeMouse.TriggerEvent = TriggerEvent
  51. UIS.TriggerEvent = TriggerEvent
  52.  
  53. --Client communication
  54. local Event = Instance.new("RemoteEvent")
  55. Event.Name = "UserInput_Event"
  56. Event.OnServerEvent:Connect(function(plr,io)
  57. if plr~=RealPlayer then return end
  58. FakeMouse.Target = io.Target
  59. FakeMouse.Hit = io.Hit
  60. if not io.isMouse then
  61. local b = io.UserInputState == Enum.UserInputState.Begin
  62. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  63. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  64. end
  65. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  66. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  67. end
  68. for _,t in pairs(CAS.Actions) do
  69. for _,k in pairs(t.Keys) do
  70. if k==io.KeyCode then
  71. t.Function(t.Name,io.UserInputState,io)
  72. end
  73. end
  74. end
  75. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  76. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  77. end
  78. end)
  79. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  80. local Mouse = owner:GetMouse()
  81. local UIS = game:GetService("UserInputService")
  82. local input = function(io,RobloxHandled)
  83. if RobloxHandled then return end
  84. --Since InputObject is a client-side instance, we create and pass table instead
  85. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  86. end
  87. UIS.InputBegan:Connect(input)
  88. UIS.InputEnded:Connect(input)
  89.  
  90. local h,t
  91. --Give the server mouse data every second frame, but only if the values changed
  92. --If player is not moving their mouse, client won't fire events
  93. local HB = game:GetService("RunService").Heartbeat
  94. while true do
  95. if h~=Mouse.Hit or t~=Mouse.Target then
  96. h,t=Mouse.Hit,Mouse.Target
  97. Event:FireServer({isMouse=true,Target=t,Hit=h})
  98. end
  99. --Wait 2 frames
  100. for i=1,2 do
  101. HB:Wait()
  102. end
  103. end]==],script)
  104.  
  105. ----Sandboxed game object that allows the usage of client-side methods and services
  106. --Real game object
  107. local RealGame = game
  108.  
  109. --Metatable for fake service
  110. local FakeService_Metatable = {
  111. __index = function(self,k)
  112. local s = rawget(self,"_RealService")
  113. if s then
  114. return typeof(s[k])=="function"
  115. and function(_,...)return s[k](s,...)end or s[k]
  116. end
  117. end,
  118. __newindex = function(self,k,v)
  119. local s = rawget(self,"_RealService")
  120. if s then s[k]=v end
  121. end
  122. }
  123. local function FakeService(t,RealService)
  124. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  125. return setmetatable(t,FakeService_Metatable)
  126. end
  127.  
  128. --Fake game object
  129. local FakeGame = {
  130. GetService = function(self,s)
  131. return rawget(self,s) or RealGame:GetService(s)
  132. end,
  133. Players = FakeService({
  134. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  135. },"Players"),
  136. UserInputService = FakeService(UIS,"UserInputService"),
  137. ContextActionService = FakeService(CAS,"ContextActionService"),
  138. RunService = FakeService({
  139. _btrs = {},
  140. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  141. BindToRenderStep = function(self,name,_,fun)
  142. self._btrs[name] = self.Heartbeat:Connect(fun)
  143. end,
  144. UnbindFromRenderStep = function(self,name)
  145. self._btrs[name]:Disconnect()
  146. end,
  147. },"RunService")
  148. }
  149. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  150. FakeGame.service = FakeGame.GetService
  151. FakeService(FakeGame,game)
  152. --Changing owner to fake player object to support owner:GetMouse()
  153. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  154. end
  155. local neck = Instance.new("Weld",char)
  156. neck.Part0 = char.Torso
  157. neck.Part1 = char.Head
  158. neck.C0 = CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  159. local humanroot = Instance.new("Weld",char)
  160. humanroot.Name = "HumanoidRoot"
  161. humanroot.Part0 = char.HumanoidRootPart
  162. humanroot.Part1 = char.Torso
  163. local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
  164. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  165. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  166. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  167. rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  168. local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
  169. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  170. lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  171. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  172. lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
  173. local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  174. llegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  175. llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"]
  176. llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0)
  177. local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
  178. game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove()
  179. local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  180. rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso
  181. rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"]
  182. rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0)
  183. plr:ClearCharacterAppearance()
  184.  
  185. local hat = Instance.new("Part",char)
  186. hat.CanCollide = false
  187. local mesh = Instance.new("FileMesh",hat)
  188. mesh.Offset = Vector3.new(0,0,0)
  189. mesh.Scale = Vector3.new(1.05,1.05,1.05)
  190. mesh.MeshId = "http://www.roblox.com/asset/?id=46834172"
  191. mesh.TextureId = "http://www.roblox.com/asset/?id=47991609"
  192. local weld = Instance.new("Weld",hat)
  193. weld.Part0 = hat
  194. weld.Part1 = char.Head
  195. weld.C0 = CFrame.new(3.93556832e-09, -0.550000191, 0.0997277573, 1, 7.87137555e-09, -3.26223034e-24, -7.87137555e-09, 1, -4.1444221e-16, 0, 4.1444221e-16, 1)
  196. textColor = BrickColor.new("Institutional white").Color
  197. local naeeym2 = Instance.new("BillboardGui",char)
  198. naeeym2.AlwaysOnTop = true
  199. naeeym2.Size = UDim2.new(5,35,2,35)
  200. naeeym2.StudsOffset = Vector3.new(0,2,0)
  201. naeeym2.Adornee = hed
  202. naeeym2.Name = "Name"
  203.  
  204. local tecks2 = Instance.new("TextLabel",naeeym2)
  205. tecks2.BackgroundTransparency = 1
  206. tecks2.TextScaled = true
  207. tecks2.BorderSizePixel = 0
  208. tecks2.Text = "Sad Guest"
  209. tecks2.Font = Enum.Font.Antique
  210. tecks2.TextSize = 30
  211. tecks2.TextStrokeTransparency = 0
  212. tecks2.TextColor3 = textColor
  213. tecks2.TextStrokeColor3 = textColor
  214. tecks2.Size = UDim2.new(1,0,0.5,0)
  215. tecks2.Parent = naeeym2
  216. textfag = tecks2
  217. tecks2.Text = "Sad Guest"
  218. function swait(num)
  219. if num == 0 or num == nil then
  220. game:service("RunService").Stepped:wait(0)
  221. else
  222. for i = 0, num do
  223. game:service("RunService").Stepped:wait(0)
  224. end
  225. end
  226. end
  227. coroutine.resume(coroutine.create(function()
  228. while textfag ~= nil do
  229. swait()
  230. textfag.Position = UDim2.new(math.random(-.2,.2),math.random(-3,3),.05,math.random(-3,3))
  231. textfag.Rotation = math.random(-3,3)
  232. end
  233. end))
  234. game:GetService("RunService").RenderStepped:connect(function()
  235. char["Right Arm"].BrickColor = BrickColor.new("Institutional white")
  236. char["Left Arm"].BrickColor = BrickColor.new("Institutional white")
  237. char.Torso.BrickColor = BrickColor.new("Institutional white")
  238. char.Head.BrickColor = BrickColor.new("Institutional white")
  239. char["Left Leg"].BrickColor = BrickColor.new("Really black")
  240. char["Right Leg"].BrickColor = BrickColor.new("Really black")
  241. end)
  242.  
  243. local shirt = Instance.new("Shirt",char)
  244. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=57282083"
  245. local player = game.Players.LocalPlayer
  246. nottransformed = true
  247. local music = Instance.new("Sound",char)
  248. music.SoundId = "rbxassetid://183166337"
  249. music.Volume = 10
  250. music.Looped = true
  251. music:Play()
  252. local ff = Instance.new("ForceField",char)
  253. ff.Visible = false
  254.  
  255. local chara = workspace:WaitForChild(player.Name)
  256. local human = chara.Humanoid
  257. local pose = "Standing"
  258.  
  259. local speed = 0
  260.  
  261. human.Running:connect(function(s)
  262. speed = s
  263. end)
  264. cananimate = true
  265. local update = game:GetService("RunService")
  266. update.RenderStepped:connect(function()
  267. local ray = Ray.new(chara.Torso.Position, (chara.Torso.Position - Vector3.new(0,9999999,0)).unit * 300)
  268. local p, position = game.Workspace:FindPartOnRay(ray, char, true, false)
  269. local dis = (chara.Torso.Position - position).magnitude
  270. if dis > 3.8 and chara.Torso.Velocity.Y > 0 then
  271. pose = "Jumping"
  272. end
  273. if dis> 3.8 and chara.Torso.Velocity.Y < 0 then
  274. pose = "Falling"
  275. end
  276. if dis < 3.8 and speed == 0 then
  277. pose = "Standing"
  278. end
  279. if dis < 3.8 and speed > 0 then
  280. pose = "Walking"
  281. end
  282. end)
  283. using = false
  284. char.Torso.Touched:connect(function(part)
  285. local human = part.Parent:FindFirstChildOfClass("Humanoid")
  286. if human and human.Parent.Name ~= char.Name and not nottransformed then
  287. human.Parent:BreakJoints()
  288. human:Destroy()
  289. end
  290. end)
  291. mouse = plr:GetMouse()
  292. function taqrwrfeshgthtg(key) -- totally not transformation
  293. if key == "e" and not using and nottransformed then
  294. using = true
  295. cananimate = false
  296. for i = 0,1 , 0.05 do
  297. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i)
  298. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i)
  299. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  300. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  301. humanroot.C0 = humanroot.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  302. neck.C0 = neck.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  303. update.RenderStepped:wait()
  304. end
  305. wait(1)
  306. local explosion = Instance.new("Explosion",char)
  307. explosion.BlastPressure = 0
  308. explosion.BlastRadius = 1
  309. explosion.Position = char.Torso.Position
  310. nottransformed = false
  311. textfag.Text = "Ultimate Guest"
  312. music:Pause()
  313. music.SoundId = "rbxassetid://167229415"
  314. music:Resume()
  315. using = false
  316. cananimate = true
  317. end
  318. end
  319. mouse.KeyDown:connect(taqrwrfeshgthtg)
  320. while true do
  321. wait()
  322. plr:ClearCharacterAppearance()
  323. shirt.Parent = char
  324. if pose == "Standing" and cananimate and nottransformed then
  325. for i = 0,1 , 0.05 do
  326. neck.C0 = neck.C0:lerp(CFrame.new(0, 1.34439754, -0.273881435, 1, 0, 0, 0, 0.869472563, 0.493981302, 0, -0.493981302, 0.869472563),i)
  327. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.940598965, 0.741546631, -0.9583745, -0.798321903, -0.602230966, 0, 0.602230966, -0.798321903, 0, 0, 0, 1),i)
  328. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.715367317, 0.758066654, -0.808870316, -0.69482702, 0.719177008, 0, -0.719177008, -0.69482702, 0, 0, 0, 1),i)
  329. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.69727612, -0.645241141, 1, 0, 0, 0, 0.905315101, -0.424740821, 0, 0.424740821, 0.905315101),i)
  330. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.66878891, -0.608989954, 1, 0, 0, 0, 0.933777869, -0.357853383, 0, 0.357853383, 0.933777869),i)
  331. humanroot.C0 = humanroot.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.909446001, -0.415821999, 0, 0.415821999, 0.909446001):inverse(),i)
  332. update.RenderStepped:wait()
  333. end
  334. end
  335. if pose == "Standing" and cananimate and not nottransformed then
  336. for i = 0,1 , 0.05 do
  337. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i)
  338. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1),i)
  339. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  340. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  341. humanroot.C0 = humanroot.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  342. neck.C0 = neck.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  343. update.RenderStepped:wait()
  344. end
  345. end
  346. if pose == "Walking" and cananimate then
  347. for i = 0,1 ,0.05 do
  348. humanroot.C0 = humanroot.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
  349. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.168842316, -0.374614239, 1, 0, 0, 0, 0.662306964, -0.74923259, 0, 0.74923259, 0.662307084),i)
  350. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.12597847, 0.331827164, 1, 0, 0, 0, 0.748035073, 0.663659215, 0, -0.663659275, 0.748035014),i)
  351. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.67391682, -0.738807678, 0.99999994, 0, 0, 0, 0.673916757, -0.738807261, 0, 0.738807321, 0.673916817),i)
  352. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.67705727, 0.735931396, 1, 0, 0, 0, 0.677056909, 0.735930681, 0, -0.735930741, 0.677056968),i)
  353. game:GetService("RunService").Stepped:wait()
  354. end
  355. for i = 0,1 ,0.05 do
  356. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.69855976, 0.715551376, 1, 0, 0, 0, 0.698559642, 0.715551734, 0, -0.715551794, 0.698559701),i)
  357. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.80723953, -0.590223312, 1, 0, 0, 0, 0.807239354, -0.590224087, 0, 0.590224147, 0.807239413),i)
  358. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.216003418, 0.411518574, 1, 0, 0, 0, 0.567983389, 0.823040009, 0, -0.823040009, 0.567983389),i)
  359. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.215018272, -0.41083622, 1, 0, 0, 0, 0.569954693, -0.821676135, 0, 0.821676135, 0.569954753),i)
  360. game:GetService("RunService").Stepped:wait()
  361. end
  362. end
  363. if pose == "Jumping" and cananimate then
  364. for i = 0,1 , 0.05 do
  365. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.999999285, 0.000862598419, 1, 0, 0, 0, -0.99999845, 0.00172528333, 0, -0.00172528345, -0.99999851),i)
  366. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.999960184, -0.00631046295, 1, 0, 0, 0, -0.999920309, -0.0126213925, 0, 0.0126213934, -0.999920368),i)
  367. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  368. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  369. update.RenderStepped:wait()
  370. end
  371. end
  372. if pose == "Falling" and cananimate then
  373. for i = 0,1 , 0.05 do
  374. rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.999999285, 0.000862598419, 1, 0, 0, 0, -0.99999845, 0.00172528333, 0, -0.00172528345, -0.99999851),i)
  375. lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5, 0.999960184, -0.00631046295, 1, 0, 0, 0, -0.999920309, -0.0126213925, 0, 0.0126213934, -0.999920368),i)
  376. llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  377. rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.99999988, 0, 1, 0, 0, 0, 0.999999881, 0, 0, 0, 1),i)
  378. update.RenderStepped:wait()
  379. end
  380. end
  381. end
Advertisement
Add Comment
Please, Sign In to add comment