Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --/{=| ROBLOX MARBLE SCRIPT |=}\--
- wait(1 / 60)
- -- | Thank you guys for 1,000 views! We're appreciating so much!!! ;-)
- local player = game.Players.LocalPlayer
- local NetworkAccess = coroutine.create(function()
- settings().Physics.AllowSleep = false
- while true do
- game:GetService('RunService').RenderStepped:Wait()
- for _, players in pairs(game.Players:GetChildren()) do
- if players ~= game.Players.LocalPlayer then
- players.MaximumSimulationRadius = 0.1
- players.SimulationRadius = 0
- end
- end
- player.MaximumSimulationRadius = math.pow(math.huge, math.huge)
- player.SimulationRadius = math.huge * math.huge
- end
- end)
- coroutine.resume(NetworkAccess)
- --Marble Settings
- local MarbleColor = "Institutional white"
- local MarbleMaterial = "Glass"
- --MarblePhysicalSettings
- local Speed = 80
- local density = .8
- local friction = .1
- local elasticity = 1
- local AutoRun = false --This script will run automatically on respawn
- --Functions
- local function Script()
- local function Weld(Part0, Part1, Parent)
- local Weld = Instance.new("Weld", Parent)
- Weld.Part0 = Part0
- Weld.Part1 = Part1
- end
- local function PlatformStand(bool)
- game.Players.LocalPlayer.Character.Humanoid.PlatformStand = bool
- end
- --Player Variables
- wait(2.5)
- local player = game.Players.LocalPlayer
- local char = player.Character
- local HRP = char["HumanoidRootPart"]
- local jump = false
- --Instances
- local Marble = Instance.new("Part", char)
- Marble.Name = "Marble"
- Marble.TopSurface = Enum.SurfaceType.Smooth
- Marble.BottomSurface = Enum.SurfaceType.Smooth
- Marble.BrickColor = BrickColor.new(MarbleColor)
- Marble.Material = MarbleMaterial
- Marble.Transparency = 0.5
- Marble.Size = Vector3.new(6.4, 6.4, 6.4)
- Marble.Shape = Enum.PartType.Ball
- Marble.FormFactor = Enum.FormFactor.Custom
- local BodyForce = Instance.new("BodyVelocity", Marble)
- --PlatformStanding
- PlatformStand(true)
- --Welding
- Marble.Position = char.HumanoidRootPart.Position
- Marble.CustomPhysicalProperties = PhysicalProperties.new(density, friction, elasticity)
- Weld(char.HumanoidRootPart, Marble, char.HumanoidRootPart)
- --Detect if player is dead
- char.Humanoid.Died:Connect(function()
- BodyForce:Destroy()
- Marble:Destroy()
- script:Destroy()
- end)
- char.Humanoid.Seated:Connect(function()
- PlatformStand(true)
- end)
- --BodyForcing
- game:GetService("RunService").RenderStepped:Connect(function()
- BodyForce.MaxForce = Vector3.new(11000, 0, 11000)
- BodyForce.P = 100000000
- BodyForce.Velocity = Vector3.new(char.Humanoid.MoveDirection.X * Speed, 0, char.Humanoid.MoveDirection.Z * Speed)
- Marble.Orientation = Vector3.new(Marble.Orientation.X, 0, Marble.Orientation.Z)
- end)
- end
- Script()
- game.Players.LocalPlayer.CharacterAdded:Connect(function()
- if AutoRun then
- Script()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement