Advertisement
Namoo546

Revenge

Apr 23rd, 2020
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.36 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152. --[[
  153. creeper aw man
  154. by ethanhong0407
  155. what does this script do?
  156. absolutely nothing else but creeper awman
  157. enjoy lads
  158. dont look at the messy script pls im bad
  159. ]]
  160.  
  161. local plr = owner
  162. local char = plr.Character
  163. local hum = char.Humanoid
  164. local rarm = char["Right Arm"]
  165. local larm = char["Left Arm"]
  166. local rleg = char["Right Leg"]
  167. local lleg = char["Left Leg"]
  168. local root = char.HumanoidRootPart
  169. local tors = char.Torso
  170. local head = char.Head
  171. local action = ""
  172. local t = tick()
  173. local RunS = game:GetService("RunService")
  174. local playback = 0
  175.  
  176. hum.HipHeight = 0.5
  177. hum.WalkSpeed = 20
  178.  
  179. head.Size = Vector3.new(2, 2, 2)
  180. rarm.Size = Vector3.new(1, 3, 1)
  181. larm.Size = Vector3.new(1, 3, 1)
  182. tors.Size = Vector3.new(2, 3, 1)
  183. rleg.Size = Vector3.new(1, 3, 1)
  184. lleg.Size = Vector3.new(1, 3, 1)
  185.  
  186. local f = Instance.new("Decal", head)
  187. f.Name = "Texture"
  188. f.Texture = "rbxassetid://3755253739"
  189. f.Face = "Front"
  190. local fc = f:Clone()
  191. fc.Parent = head
  192. fc.Texture = "rbxassetid://3755175019"
  193. fc.Face = "Back"
  194. local fc = f:Clone()
  195. fc.Parent = head
  196. fc.Texture = "rbxassetid://3755174443"
  197. fc.Face = "Left"
  198. local fc = f:Clone()
  199. fc.Parent = head
  200. fc.Texture = "rbxassetid://3755252237"
  201. fc.Face = "Right"
  202. local fc = f:Clone()
  203. fc.Parent = head
  204. fc.Texture = "rbxassetid://3755175626"
  205. fc.Face = "Top"
  206.  
  207. local glasses = Instance.new("Part", char)
  208. glasses.Anchored = false
  209. glasses.CanCollide = false
  210. glasses.Material = "Neon"
  211. glasses.Transparency = 1
  212. glasses.Size = Vector3.new(2.25, 2.25, 2.25)
  213. glasses.CastShadow = false
  214. local g = Instance.new("Decal", glasses)
  215. g.Name = "Texture"
  216. g.Texture = "rbxassetid://3755176276"
  217. g.Face = "Front"
  218. local gc = g:Clone()
  219. gc.Parent = glasses
  220. gc.Texture = "rbxassetid://3755177267"
  221. gc.Face = "Right"
  222. local gc = g:Clone()
  223. gc.Parent = glasses
  224. gc.Texture = "rbxassetid://3755176850"
  225. gc.Face = "Left"
  226. local glassesw = Instance.new("Weld", glasses)
  227. glassesw.Part0 = head
  228. glassesw.Part1 = glasses
  229.  
  230. local mouth = Instance.new("Part", char)
  231. mouth.Name = "Mouth"
  232. mouth.BrickColor = BrickColor.new(Color3.new(0, 0, 0))
  233. mouth.Size = Vector3.new(1, 0.5, 2)
  234. local mouthm = Instance.new("Weld", mouth)
  235. mouthm.Part0 = head
  236. mouthm.Part1 = mouth
  237. mouthm.C0 = CFrame.new(0, -0.6, -0.01)
  238. local mouthsize = Instance.new("BlockMesh", mouth)
  239.  
  240. for i,stuff in pairs(char:GetChildren()) do
  241. if stuff:IsA("Shirt") or stuff:IsA("Pants") or stuff:IsA("BodyColors") or stuff:IsA("Hat") or stuff:IsA("Accessory") or stuff:IsA("Accoutrement") or stuff:IsA("CharacterMesh") then
  242. stuff:Destroy()
  243. end
  244. end
  245.  
  246. local music = Instance.new("Sound", head)
  247. music.SoundId = "rbxassetid://3807239428"
  248. music.Name = "Music"
  249. music.Volume = 5
  250. music.Looped = true
  251. music:Play()
  252.  
  253. if head:FindFirstChild("Mesh") then head.Mesh:Destroy() end
  254. if head:FindFirstChild("face") then head.face:Destroy() end
  255.  
  256. local shirt = Instance.new("Shirt", char)
  257. shirt.ShirtTemplate = "rbxassetid://3516317543"
  258. local pants = Instance.new("Pants", char)
  259. pants.PantsTemplate = "rbxassetid://3516314876"
  260.  
  261.  
  262. local colors = Instance.new("BodyColors", char)
  263. colors.HeadColor = BrickColor.new("Brick yellow")
  264. colors.LeftArmColor = BrickColor.new("Brick yellow")
  265. colors.RightArmColor = BrickColor.new("Brick yellow")
  266. colors.TorsoColor = BrickColor.new("Brick yellow")
  267. colors.LeftLegColor = BrickColor.new("Brick yellow")
  268. colors.RightLegColor = BrickColor.new("Brick yellow")
  269.  
  270. function createJoint(wp0, wp1, wc0x, wc0y, wc0z, wc1x, wc1y, wc1z, name)
  271. local joint = Instance.new("Weld", wp0)
  272. joint.Part0 = wp0
  273. joint.Part1 = wp1
  274. joint.C0 = CFrame.new(wc0x, wc0y, wc0z)
  275. joint.C1 = CFrame.new(wc1x, wc1y, wc1z)
  276. joint.Name = name
  277. return joint
  278. end
  279.  
  280. local RS = createJoint(char.Torso, char["Right Arm"], 1.5, 1, 0, 0, 1, 0, "Right Shoulder")
  281. local TS = createJoint(char.HumanoidRootPart, char.Torso, 0, 0, 0, 0, 0, 0, "RootJoint")
  282. local LS = createJoint(char.Torso, char["Left Arm"], -1.5, 1, 0, 0, 1, 0, "Left Shoulder")
  283. local RH = createJoint(char.Torso, char["Right Leg"], 0.5, -1.5, 0, 0, 1.5, 0, "Right Hip")
  284. local LH = createJoint(char.Torso, char["Left Leg"], -0.5, -1.5, 0, 0, 1.5, 0, "Left Hip")
  285. local NK = createJoint(char.Torso, char.Head, 0, 2, 0, 0, -1/2, 0, "Neck")
  286.  
  287. local rsc0 = RS.C0
  288. local lsc0 = LS.C0
  289. local tsc0 = TS.C0
  290. local rhc0 = RH.C0
  291. local lhc0 = LH.C0
  292. local nkc0 = NK.C0
  293.  
  294. local remote = Instance.new("RemoteFunction", char)
  295. remote.Name = "MouthRemote"
  296.  
  297. function recieveInfo(player, info, n, t, ls, rs, lh, rh)
  298. playback = info
  299. NK.C0 = n
  300. TS.C0 = t
  301. LS.C0 = ls
  302. RS.C0 = rs
  303. LH.C0 = lh
  304. RH.C0 = rh
  305. return info
  306. end
  307. remote.OnServerInvoke = recieveInfo
  308.  
  309. NLS([[
  310. local plr = owner
  311. local cam = workspace.CurrentCamera
  312. local char = plr.Character
  313. local NK = char.Torso:WaitForChild("Neck")
  314. local RS = char.Torso:WaitForChild("Right Shoulder")
  315. local LS = char.Torso:WaitForChild("Left Shoulder")
  316. local RH = char.Torso:WaitForChild("Right Hip")
  317. local LH = char.Torso:WaitForChild("Left Hip")
  318. local TS = char.HumanoidRootPart:WaitForChild("RootJoint")
  319. local hum = char.Humanoid
  320.  
  321. local rsc0 = CFrame.new(1.5, 1, 0)
  322. local lsc0 = CFrame.new(-1.5, 1, 0)
  323. local tsc0 = CFrame.new()
  324. local rhc0 = CFrame.new(0.5, -1.5, 0)
  325. local lhc0 =CFrame.new(-0.5, -1.5, 0)
  326. local nkc0 = CFrame.new(0, 2, 0)
  327.  
  328. local music = owner.Character.Head:WaitForChild("Music")
  329. local mouth = char:WaitForChild("Mouth")
  330. local mouthsize = mouth:WaitForChild("Mesh")
  331. local t = tick()
  332. local root = char.HumanoidRootPart
  333. local action = ""
  334.  
  335. function lerp(a, b, t)
  336. return a * (1-t) + (b*t)
  337. end
  338.  
  339. game:GetService("RunService").RenderStepped:connect(function()
  340. t = t + 0.5
  341.  
  342. local playback = music.PlaybackLoudness
  343. local a = playback - 350
  344. a = a * 3
  345. if a < 0 then
  346. a = 0
  347. elseif a > 45 then
  348. a = 45
  349. end
  350. cam.FieldOfView = lerp(cam.FieldOfView, 70 + playback/20, 0.3)
  351. NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
  352. mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
  353.  
  354.  
  355. if not hum.Sit then
  356. if math.abs(root.Velocity.x) > 1 or math.abs(root.Velocity.z) > 1 and hum:GetState() ~= Enum.HumanoidStateType.Freefall then
  357. action = "Walk"
  358. elseif math.abs(root.Velocity.x) < 1 or math.abs(root.Velocity.z) < 1 then
  359. action = "Idle"
  360. end
  361. else
  362. action = "Sit"
  363. end
  364.  
  365. NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
  366. mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
  367.  
  368. if action == "Idle" then
  369. speed = 0.5
  370.  
  371. TS.C0 = TS.C0:lerp(tsc0, speed)
  372. LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(0, 0, math.rad(-2) + -math.sin(t/20)/10/2), speed)
  373. RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(0, 0, math.rad(2) + math.sin(t/20)/10/2), speed)
  374. LH.C0 = LH.C0:lerp(lhc0, speed)
  375. RH.C0 = RH.C0:lerp(rhc0, speed)
  376. elseif action == "Walk" then
  377. speed = 0.5
  378.  
  379. TS.C0 = TS.C0:lerp(tsc0, speed)
  380. LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(math.sin(t/3)/1.5, 0, 0), speed)
  381. RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(-math.sin(t/3)/1.5, 0, 0), speed)
  382. LH.C0 = LH.C0:lerp(lhc0 * CFrame.Angles(-math.sin(t/3)/1.5, 0, 0), speed)
  383. RH.C0 = RH.C0:lerp(rhc0 * CFrame.Angles(math.sin(t/3)/1.5, 0, 0), speed)
  384. elseif action == "Sit" then
  385. speed = 0.5
  386.  
  387. TS.C0 = TS.C0:lerp(tsc0 * CFrame.new(0, 0.5, 0), speed)
  388. LS.C0 = LS.C0:lerp(lsc0 * CFrame.Angles(math.rad(15), 0, math.rad(-2) + -math.sin(t/20)/10/2), speed)
  389. RS.C0 = RS.C0:lerp(rsc0 * CFrame.Angles(math.rad(15), 0, math.rad(2) + math.sin(t/20)/10/2), speed)
  390. LH.C0 = LH.C0:lerp(lhc0 * CFrame.Angles(math.rad(90), 0, -math.rad(15)), speed)
  391. RH.C0 = RH.C0:lerp(rhc0 * CFrame.Angles(math.rad(90), 0, math.rad(15)), speed)
  392. end
  393.  
  394.  
  395. if owner.Character:WaitForChild("MouthRemote") then
  396. owner.Character.MouthRemote:InvokeServer(music.PlaybackLoudness, NK.C0, TS.C0, LS.C0, RS.C0, LH.C0, RH.C0)
  397. end
  398.  
  399.  
  400.  
  401. end)
  402. ]], char)
  403.  
  404.  
  405.  
  406. RunS.Stepped:connect(function()
  407. t = t + 0.5
  408. local a = playback - 350
  409. a = a * 3
  410. if a < 0 then
  411. a = 0
  412. elseif a > 45 then
  413. a = 45
  414. end
  415.  
  416. NK.C0 = NK.C0:lerp(nkc0 * CFrame.Angles(math.rad(a)/3, 0, 0), 0.1)
  417. mouthsize.Scale = mouthsize.Scale:lerp(Vector3.new(0.75+a/45/2, a/45, 1), 0.1)
  418.  
  419.  
  420. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement