Upscalefanatic3

Script that can shrink and grow size

Mar 8th, 2019
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.68 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 print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6. function giant(p, size)
  7. local pchar = p.Character
  8. if pchar then
  9. local function scale(chr,scl)
  10.  
  11. for _,v in pairs(pchar:GetChildren()) do
  12. if v:IsA("Hat") then
  13. v:Clone()
  14. v.Parent = game.Lighting
  15. end
  16. end
  17.  
  18. local Head = chr['Head']
  19. local Torso = chr['Torso']
  20. local LA = chr['Left Arm']
  21. local RA = chr['Right Arm']
  22. local LL = chr['Left Leg']
  23. local RL = chr['Right Leg']
  24. local HRP = chr['HumanoidRootPart']
  25.  
  26. wait(0.1)
  27.  
  28. Head.formFactor = 3
  29. Torso.formFactor = 3
  30. LA.formFactor = 3
  31. RA.formFactor = 3
  32. LL.formFactor = 3
  33. RL.formFactor = 3
  34. HRP.formFactor = 3
  35.  
  36. Head.Size = Vector3.new(scl * 2, scl, scl)
  37. Torso.Size = Vector3.new(scl * 2, scl * 2, scl)
  38. LA.Size = Vector3.new(scl, scl * 2, scl)
  39. RA.Size = Vector3.new(scl, scl * 2, scl)
  40. LL.Size = Vector3.new(scl, scl * 2, scl)
  41. RL.Size = Vector3.new(scl, scl * 2, scl)
  42. HRP.Size = Vector3.new(scl * 2, scl * 2, scl)
  43.  
  44. local Motor1 = Instance.new('Motor6D', Torso)
  45. Motor1.Part0 = Torso
  46. Motor1.Part1 = Head
  47. Motor1.C0 = CFrame.new(0, 1 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
  48. Motor1.C1 = CFrame.new(0, -0.5 * scl, 0) * CFrame.Angles(-1.6, 0, 3.1)
  49. Motor1.Name = "Neck"
  50.  
  51. local Motor2 = Instance.new('Motor6D', Torso)
  52. Motor2.Part0 = Torso
  53. Motor2.Part1 = LA
  54. Motor2.C0 = CFrame.new(-1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  55. Motor2.C1 = CFrame.new(0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  56. Motor2.Name = "Left Shoulder"
  57.  
  58. local Motor3 = Instance.new('Motor6D', Torso)
  59. Motor3.Part0 = Torso
  60. Motor3.Part1 = RA
  61. Motor3.C0 = CFrame.new(1 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  62. Motor3.C1 = CFrame.new(-0.5 * scl, 0.5 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  63. Motor3.Name = "Right Shoulder"
  64.  
  65. local Motor4 = Instance.new('Motor6D', Torso)
  66. Motor4.Part0 = Torso
  67. Motor4.Part1 = LL
  68. Motor4.C0 = CFrame.new(-1 * scl, -1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  69. Motor4.C1 = CFrame.new(-0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, -1.6, 0)
  70. Motor4.Name = "Left Hip"
  71.  
  72. local Motor5 = Instance.new('Motor6D', Torso)
  73. Motor5.Part0 = Torso
  74. Motor5.Part1 = RL
  75. Motor5.C0 = CFrame.new(1 * scl, -1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  76. Motor5.C1 = CFrame.new(0.5 * scl, 1 * scl, 0) * CFrame.Angles(0, 1.6, 0)
  77. Motor5.Name = "Right Hip"
  78.  
  79. local Motor6 = Instance.new('Motor6D', HRP)
  80. Motor6.Part0 = HRP
  81. Motor6.Part1 = Torso
  82. Motor6.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
  83. Motor6.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(-1.6, 0, -3.1)
  84.  
  85. end
  86.  
  87. scale(pchar, size)
  88. pchar.Humanoid.WalkSpeed = 15 * size
  89.  
  90. for _,v in pairs(game.Lighting:GetChildren()) do
  91. if v:IsA("Hat") then
  92. v.Parent = pchar
  93. end
  94. end
  95. end
  96. end
  97.  
  98. local plr = game.Players.LocalPlayer
  99. giant(plr,1)
  100.  
  101.  
  102. local csize = 1
  103.  
  104. local sgui = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
  105. local base = Instance.new("Frame", sgui)
  106. base.BackgroundTransparency = 1
  107. base.Size = UDim2.new(0, 110, 0, 200)
  108. base.Position = UDim2.new(1, -120, 1, -180)
  109. local indicator = Instance.new("TextLabel", base)
  110. indicator.Size = UDim2.new(1, 0, 0, 25)
  111. indicator.TextColor3 = Color3.new(1, 1, 1)
  112. indicator.BackgroundTransparency = 0
  113. indicator.FontSize = Enum.FontSize.Size18
  114. indicator.Font = Enum.Font.SourceSans
  115. indicator.Text = "Current Size: 3"
  116. local PlusOne = Instance.new("TextButton", base)
  117. PlusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
  118. PlusOne.Position = UDim2.new(0, 0, 0, 40)
  119. PlusOne.Size = UDim2.new(1, 0, 0.5, -50)
  120. PlusOne.BorderSizePixel = 2
  121. PlusOne.Font = Enum.Font.SourceSansBold
  122. PlusOne.FontSize = Enum.FontSize.Size24
  123. PlusOne.Text = "+.1 Size"
  124. local MinusOne = Instance.new("TextButton", base)
  125. MinusOne.BackgroundColor3 = Color3.new(214/255, 214/255, 214/255)
  126. MinusOne.Position = UDim2.new(0, 0, 0.5, 10)
  127. MinusOne.Size = UDim2.new(1, 0, 0.5, -50)
  128. MinusOne.Text = "-.1 Size"
  129. MinusOne.BorderSizePixel = 2
  130. MinusOne.Font = Enum.Font.SourceSansBold
  131. MinusOne.FontSize = Enum.FontSize.Size24
  132.  
  133. PlusOne.MouseButton1Down:connect(function()
  134. csize = csize + .1
  135. giant(plr, csize)
  136. indicator.Text = "Current Size: "..tostring(csize)
  137. end)
  138.  
  139. MinusOne.MouseButton1Down:connect(function()
  140. csize = csize - .1
  141. giant(plr, csize)
  142. indicator.Text = "Current Size: "..tostring(csize)
  143. end)
Add Comment
Please, Sign In to add comment