-----------------

Ultimate guest V3

Jan 28th, 2020
473
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.34 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code V2 by Mokiros")
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9. --Fake event to make stuff like Mouse.KeyDown work
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29. --Creating fake input objects with fake variables
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49. --Client communication
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80. --Since InputObject is a client-side instance, we create and pass table instead
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85.  
  86. local h,t
  87. --Give the server mouse data every second frame, but only if the values changed
  88. --If player is not moving their mouse, client won't fire events
  89. local HB = game:GetService("RunService").Heartbeat
  90. while true do
  91. if h~=Mouse.Hit or t~=Mouse.Target then
  92. h,t=Mouse.Hit,Mouse.Target
  93. Event:FireServer({isMouse=true,Target=t,Hit=h})
  94. end
  95. --Wait 2 frames
  96. for i=1,2 do
  97. HB:Wait()
  98. end
  99. end]==],script)
  100.  
  101. ----Sandboxed game object that allows the usage of client-side methods and services
  102. --Real game object
  103. local RealGame = game
  104.  
  105. --Metatable for fake service
  106. local FakeService_Metatable = {
  107. __index = function(self,k)
  108. local s = rawget(self,"_RealService")
  109. if s then
  110. return typeof(s[k])=="function"
  111. and function(_,...)return s[k](s,...)end or s[k]
  112. end
  113. end,
  114. __newindex = function(self,k,v)
  115. local s = rawget(self,"_RealService")
  116. if s then s[k]=v end
  117. end
  118. }
  119. local function FakeService(t,RealService)
  120. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  121. return setmetatable(t,FakeService_Metatable)
  122. end
  123.  
  124. --Fake game object
  125. local FakeGame = {
  126. GetService = function(self,s)
  127. return rawget(self,s) or RealGame:GetService(s)
  128. end,
  129. Players = FakeService({
  130. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  131. },"Players"),
  132. UserInputService = FakeService(UIS,"UserInputService"),
  133. ContextActionService = FakeService(CAS,"ContextActionService"),
  134. RunService = FakeService({
  135. _btrs = {},
  136. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  137. BindToRenderStep = function(self,name,_,fun)
  138. self._btrs[name] = self.Heartbeat:Connect(fun)
  139. end,
  140. UnbindFromRenderStep = function(self,name)
  141. self._btrs[name]:Disconnect()
  142. end,
  143. },"RunService")
  144. }
  145. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  146. FakeGame.service = FakeGame.GetService
  147. FakeService(FakeGame,game)
  148. --Changing owner to fake player object to support owner:GetMouse()
  149. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  150. end
  151. plr = game.Players.LocalPlayer
  152. repeat wait() until plr.Character
  153. char = plr.Character
  154.  
  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