Universal Script 📌
55 Views
37 Executions

Weight/Mass Set Script (Universal)

Universal Script 📌
cleberjacqueline
cleberjacquelineFirst script
4 days ago · Updated

Reviewed by QueueSpeedDemonPaid revieweron How review works

Get an executor
Please login to perform these actions:

Does it work?

Early reports

100% say it works · 1 report in the last 2 weeks

Also noticed:

Description

a script that changes your characters mass

Updates

  1. Script edited: Edited during review before approval

View Raw
local Players = game:GetService("Players")
local UIS = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer

local DEFAULT = 0.7
local state = {density = DEFAULT, strength = 1, press = true}

----------------------------------------------------------------
-- weight
----------------------------------------------------------------
local function props()
	return PhysicalProperties.new(state.density, 0.3, 0, 1, 1)
end

local function applyWeight(char)
	if not char then return end
	for _, p in ipairs(char:GetDescendants()) do
		if p:IsA("BasePart") then p.CustomPhysicalProperties = props() end
	end
end

local function getMass()
	local char = player.Character
	local root = char and char:FindFirstChild("HumanoidRootPart")
	return root and root.AssemblyMass or 0
end

local function hookCharacter(char)
	task.wait(0.5)
	applyWeight(char)
	char.DescendantAdded:Connect(function(p)
		if p:IsA("BasePart") then p.CustomPhysicalProperties = props() end
	end)
end
player.CharacterAdded:Connect(hookCharacter)
if player.Character then task.spawn(hookCharacter, player.Character) end

----------------------------------------------------------------
-- press parts below


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Universal Script 📌
1.3M
591.3k
Bumped 58 minutes ago
Script hub
2.5k
19.4k
Bumped 2 hours ago
Universal Script 📌
249
104
Approved 3 hours ago
Universal Script 📌
60
268
Approved 4 hours ago
Universal Script 📌
81
50
Approved 4 hours ago
Script hub
98
226
Approved 5 hours ago
Key System