Advertisement
RiasGremory0100

Body resizer

Mar 6th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. local RbxGui = LoadLibrary("RbxGui")
  2. local starterGui = game:GetService("StarterGui")
  3. starterGui:SetCore("ResetButtonCallback",false)
  4.  
  5. local self = script.Parent
  6. local frame = self:WaitForChild("Frame")
  7.  
  8. local player = game.Players.YuujiKazamiGrisaia
  9.  
  10. local char = player.Character or player.CharacterAdded:wait()
  11. local humanoid = char:WaitForChild("Humanoid")
  12. humanoid:SetStateEnabled("Dead",false)
  13.  
  14. local uniformScale = Instance.new("NumberValue",humanoid)
  15. uniformScale.Name = "UniformScale"
  16. uniformScale.Value = 1
  17.  
  18. local sliderValues = {}
  19.  
  20. local function onUniformScaleChanged(newValue)
  21. for _,label in pairs(frame:GetChildren()) do
  22. if label.Name ~= "UniformScale" then
  23. local sliderValue = sliderValues[label]
  24. if sliderValue then
  25. sliderValue.Value = math.floor(newValue*50)
  26. end
  27. end
  28. end
  29. end
  30.  
  31. uniformScale.Changed:connect(onUniformScaleChanged)
  32.  
  33. for _,label in pairs(frame:GetChildren()) do
  34. local value = humanoid:WaitForChild(label.Name)
  35. local slider,sliderVal = RbxGui.CreateSlider(500,200,UDim2.new(0,30,1.5,0))
  36. slider.Parent = label
  37. sliderVal.Value = 50
  38.  
  39. local function update(newValue)
  40. value.Value = newValue/50
  41. if label.Name == "HeadScale" then
  42. local head = char:FindFirstChild("Head")
  43. if head then
  44. local mesh = head:FindFirstChild("Mesh")
  45. if mesh and mesh.MeshType.Name == "Head" then
  46. mesh.Scale = Vector3.new(1.25,1.25,1.25)
  47. end
  48. end
  49. end
  50. end
  51.  
  52. update(50)
  53. sliderVal.Changed:connect(update)
  54.  
  55. sliderValues[label] = sliderVal
  56. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement