Advertisement
idkwhatiam

squat simulator lol

Jun 8th, 2019
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.22 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3.     script.Parent = owner.Character
  4.     local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5.     local function NewFakeEvent()
  6.         local Bind = Instance.new("BindableEvent")
  7.         local Fake;Fake = {Connections = {},
  8.         fakeEvent=true;
  9.         Connect=function(self,Func)
  10.             Bind.Event:connect(Func)
  11.             self.Connections[Bind] = true
  12.             return setmetatable({Connected = true},{
  13.             __index = function (self,Index)
  14.                 if Index:lower() == "disconnect" then
  15.                     return function() Fake.Connections[Bind] = false;self.Connected = false end
  16.                 end
  17.                 return Fake[Index]
  18.             end;
  19.             __tostring = function() return "Connection" end;
  20.         })
  21.         end}
  22.         Fake.connect = Fake.Connect;return Fake;
  23.     end
  24.     local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25.     local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26.     local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27.         self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28.     end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29.     local function TriggerEvent(self,Event,...)
  30.         local Trigger = Mouse[Event]
  31.         if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32.             for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33.         end
  34.     end
  35.     Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36.     Event.OnServerEvent:Connect(function(FiredBy,Input)
  37.         if FiredBy.Name ~= owner.Name then return end
  38.         if Input.MouseEvent then
  39.             Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40.         else
  41.             local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42.             if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43.             for _,Action in pairs(ContextActionService.Actions) do
  44.                 for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45.             end
  46.             Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47.             UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48.         end
  49.     end)
  50.     InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51.     Event.Parent = NLS([[
  52.         local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53.         local Input = function(Input,gameProcessedEvent)
  54.             if gameProcessedEvent then return end
  55.             Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56.         end
  57.         UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58.         local Hit,Target
  59.         while wait(1/30) do
  60.             if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61.                 Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62.             end
  63.         end
  64.     ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67.     __index = function (self,Index)
  68.         local Sandbox = function (Thing)
  69.             if Thing:IsA("Player") then
  70.                 local RealPlayer = Thing
  71.                 return setmetatable({},{
  72.                     __index = function (self,Index)
  73.                         local Type = type(RealPlayer[Index])
  74.                         if Type == "function" then
  75.                             if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76.                                 return function (self)return InternalData["Mouse"] end
  77.                             end
  78.                             return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79.                         end
  80.                         return RealPlayer[Index]
  81.                     end;
  82.                     __tostring = function(self) return RealPlayer.Name end
  83.                 })
  84.             end
  85.         end
  86.         if RealGame[Index] then
  87.             local Type = type(RealGame[Index])
  88.             if Type == "function" then
  89.                 if Index:lower() == "getservice" or Index:lower() == "service" then
  90.                     return function (self,Service)
  91.                         local FakeServices = {
  92.                             ["players"] = function()
  93.                                 return setmetatable({},{
  94.                                     __index = function (self2,Index2)
  95.                                         local RealService = RealGame:GetService(Service)
  96.                                         local Type2 = type(Index2)
  97.                                         if Type2 == "function" then
  98.                                             return function (self,...) return RealService[Index2](RealService,...)end
  99.                                         else
  100.                                             if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101.                                             return RealService[Index2]
  102.                                         end
  103.                                     end;
  104.                                     __tostring = function(self) return RealGame:GetService(Service).Name end
  105.                                 })
  106.                             end;
  107.                             ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108.                             ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109.                             ["runservice"] = function()
  110.                                 return setmetatable({},{
  111.                                     __index = function(self2,Index2)
  112.                                         local RealService = RealGame:GetService(Service)
  113.                                         local Type2 = type(Index2)
  114.                                         if Type2 == "function" then
  115.                                             return function (self,...) return RealService[Index2](RealService,...) end
  116.                                         else
  117.                                             local RunServices = {
  118.                                                 ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119.                                                 ["renderstepped"] = function() return RealService["Stepped"] end
  120.                                             }
  121.                                             if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122.                                             return RealService[Index2]
  123.                                         end
  124.                                     end
  125.                                 })
  126.                             end
  127.                         }
  128.                         if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129.                         return RealGame:GetService(Service)
  130.                     end
  131.                 end
  132.                 return function (self,...) return RealGame[Index](RealGame,...) end
  133.             else
  134.                 if game:GetService(Index) then return game:GetService(Index) end
  135.                 return RealGame[Index]
  136.             end
  137.         end
  138.         return nil
  139.     end
  140.         });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141.  
  142. print("script by youngmacka123")
  143. plr = owner
  144. mouse = plr:GetMouse()
  145. char = plr.Character
  146. hum = char.HumanoidRootPart
  147. root = char.Torso
  148. left = char["Left Arm"]
  149. right = char["Right Arm"]
  150. rightl = char["Right Leg"]
  151. leftl = char["Left Leg"]
  152. squat = false
  153.  
  154. local torso
  155. local arm1
  156. local arm2
  157. local leg1
  158. local leg2
  159.  
  160. local sur = Instance.new("BillboardGui", char.Head)
  161. sur.Name = "Billboard"
  162. sur.Adornee = char.Head
  163. sur.Size = UDim2.new(10, 0, 5, 0)
  164. sur.StudsOffset = Vector3.new(0, 5, 0)
  165. local text = Instance.new("TextLabel", sur)
  166. text.Text = "squatting dude"
  167. text.Size = UDim2.new(1, 0, 1, 0)
  168. text.TextScaled = true
  169. text.BackgroundTransparency = 1
  170. text.Font = Enum.Font.Cartoon
  171. text.TextColor3 = Color3.new(0, 255, 0)
  172. text.TextStrokeTransparency = 0
  173.  
  174. txt = text.Text
  175.  
  176. level = Instance.new("NumberValue",char)
  177. level.Name = "SquattingLevel"
  178. level.Value = 0
  179.  
  180. stat = level.Value
  181.  
  182. function SQUAT()
  183. squat = true
  184. stat = stat + 1
  185.  
  186. torso = Instance.new("Weld")
  187. torso.Parent = root
  188. torso.Part0 = root
  189. torso.Part1 = hum
  190.    
  191. arm1 = Instance.new("Weld")
  192. arm1.Parent = left
  193. arm1.Part0 = left
  194. arm1.Part1 = root
  195. arm1.C0 = CFrame.new(-1.5, 0, 0)
  196.    
  197. arm2 = Instance.new("Weld")
  198. arm2.Parent = right
  199. arm2.Part0 = right
  200. arm2.Part1 = root
  201. arm2.C0 = CFrame.new(1.5, 0, 0)
  202.    
  203. leg1 = Instance.new("Weld")
  204. leg1.Parent = leftl
  205. leg1.Part0 = leftl
  206. leg1.Part1 = hum
  207. leg1.C0 = CFrame.new(-0.5, 2, 0)
  208.    
  209. leg2 = Instance.new("Weld")
  210. leg2.Parent = rightl
  211. leg2.Part0 = rightl
  212. leg2.Part1 = hum
  213. leg2.C0 = CFrame.new(0.5, 2, 0)
  214.  
  215. torso.C0 = CFrame.new(0, 0.5, 0)
  216. arm1.C1 = CFrame.Angles(-80, 0, 0)
  217. arm2.C1 = CFrame.Angles(-80, 0, 0)
  218. leg1.C0 = CFrame.new(-1.5, 2, 0)
  219. leg2.C0 = CFrame.new(1.5, 2, 0)
  220. wait(0.3)
  221. squat = false
  222. torso:Destroy()
  223. arm1:Destroy()
  224. arm2:Destroy()
  225. leg1:Destroy()
  226. leg2:Destroy()
  227. end
  228.  
  229. mouse.Button1Down:Connect(function()
  230.     if squat == false then
  231.         SQUAT()
  232.     end
  233. end)
  234.  
  235. --WRAPPING UP--
  236.  
  237. while true do
  238. wait(0.000000000001)
  239. if stat == 35 then
  240.     txt = "rookie"
  241. end
  242.  
  243. if stat == 70 then
  244.     txt = "noice"
  245. end
  246.  
  247. if stat == 120 then
  248.     txt = "chill"
  249. end
  250.  
  251. if stat == 175 then
  252.     txt = "sweet"
  253. end
  254.  
  255. if stat == 250 then
  256.     txt = "smug"
  257. end
  258.  
  259. if stat == 320 then
  260.     txt = "mlg"
  261. end
  262.  
  263. if stat == 353 then
  264.     txt = "sick"
  265. end
  266.  
  267. if stat == 400 then
  268.     txt = "master"
  269. end
  270.  
  271. if stat == 470 then
  272.     txt = "the king"
  273. end
  274.  
  275. if stat == 520 then
  276.     txt = "chill lord"
  277. end
  278.  
  279. if stat == 580 then
  280.     txt = "smug god"
  281. end
  282.  
  283. if stat == 620 then
  284.     txt = "thanos"
  285. end
  286.  
  287. if stat == 700 then
  288.     txt = "thanos truck"
  289. end
  290.  
  291. if stat == 750 then
  292.     txt = "godfather"
  293. end
  294.  
  295. if stat == 800 then
  296.     txt = "seahorse"
  297. end
  298.  
  299. if stat == 900 then
  300.     txt = "minecraft steve"
  301. end
  302.  
  303. if stat == 950 then
  304.     txt = "naruto"
  305. end
  306.  
  307. if stat == 1000 then
  308.     txt = "sanic hedge"
  309. end
  310.  
  311. if stat == 1200 then
  312.     txt = ":thonk:"
  313. end
  314.  
  315. if stat == 1500 then
  316.     txt = ":ok:"
  317. end
  318.  
  319. if stat == 1700 then
  320.     txt = "not-ve"
  321. end
  322.  
  323. if stat == 2000 then
  324.     txt = "toast"
  325. end
  326.  
  327. if stat == 2500 then
  328.     txt = "dio"
  329. end
  330. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement