Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Percentage = 1 -- 1 = normal, 0.5 = half your normal size, 2 = double your normal size
- local NewPercentage = Vector3.new(1,1.5,1)
- local FixedPercentage = Vector3.new(1, 1/1.5,1)
- local HeadPercentage = Vector3.new(1,1.5,1)
- local LastGrowth = 0
- local HumanoidTable = { ["Head" ] ="Head"}
- script.Parent.Touched:Connect(function(Hit)
- if time() - LastGrowth > 1 then
- LastGrowth = time()
- local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
- if Player and Player.Character:FindFirstChild("AppliedGrowth") == nil then
- local Motors = {}
- local NewMotors = {}
- local NewVal = Instance.new("BoolValue")
- NewVal.Name = "AppliedGrowth"
- NewVal.Parent = Player.Character
- for i,v in pairs(Player.Character.Torso:GetChildren()) do
- if v:IsA("Motor6D") then
- table.insert(Motors, v)
- end
- end
- table.insert(Motors, Player.Character.HumanoidRootPart.RootJoint)
- local HatWelds = {}
- for i,v in pairs(Player.Character:GetChildren()) do
- if v:IsA("Accessory") then
- v.Handle.AccessoryWeld.C0 = CFrame.new((v.Handle.AccessoryWeld.C0.p * Percentage)) * (v.Handle.AccessoryWeld.C0 - v.Handle.AccessoryWeld.C0.p)
- v.Handle.AccessoryWeld.C1 = CFrame.new((v.Handle.AccessoryWeld.C1.p * Percentage)) * (v.Handle.AccessoryWeld.C1 - v.Handle.AccessoryWeld.C1.p)
- table.insert(HatWelds, {v.Handle.AccessoryWeld:Clone(), v.Handle})
- v.Handle.SpecialMesh.Scale = v.Handle.SpecialMesh.Scale * Percentage
- end
- end
- for i,v in pairs(Motors) do
- local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C0:components()
- X = X * 1
- Y = Y *1.5
- Z = Z * 1
- -- --
- -- R00 = R00 * Percentage
- -- R01 = R01 * Percentage
- -- R02 = R02 * Percentage
- -- --
- -- R10 = R10 * Percentage
- -- R11 = R11 * Percentage
- -- R12 = R12 * Percentage
- -- --
- -- R20 = R20 * Percentage
- -- R21 = R21 * Percentage
- -- R22 = R22 * Percentage
- --
- v.C0 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
- local X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = v.C1:components()
- X = X * 1
- Y = Y * 1.5
- Z = Z * 1
- -- --
- -- R00 = R00 * Percentage
- -- R01 = R01 * Percentage
- -- R02 = R02 * Percentage
- -- --
- -- R10 = R10 * Percentage
- -- R11 = R11 * Percentage
- -- R12 = R12 *Percentage
- -- --
- -- R20 = R20 * Percentage
- -- R21 = R21 * Percentage
- -- R22 = R22 * Percentage
- v.C1 = CFrame.new(X, Y, Z, R00, R01, R02, R10, R11, R12, R20, R21, R22)
- table.insert(NewMotors, {v:Clone(), v.Parent})
- v:Destroy()
- end
- for i,v in pairs(Player.Character:GetChildren()) do
- if v:isA("BasePart") then
- if HumanoidTable[v.Name] == nil then
- v.Size = v.Size*NewPercentage
- end
- if HumanoidTable[v.Name] ~= nil then
- v.Size = v.Size*HeadPercentage
- Player.Character.Head.Size = Player.Character.Head.Size*FixedPercentage
- end
- end
- for i,v in pairs(NewMotors) do
- v[1].Parent = v[2]
- end
- for i,v in pairs(HatWelds) do
- v[1].Part1 = Player.Character.Head
- v[1].Parent = v[2]
- end
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement