0% found this document useful (0 votes)
59 views2 pages

Message

The script initializes a part in the game workspace if it doesn't already exist and continuously updates its position based on the player's humanoid root part. It uses raycasting to detect the environment and adjusts the player's position and hip height accordingly. The script also includes a mechanism to temporarily disable the player's platform standing when interacting with certain objects.

Uploaded by

vannagpt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views2 pages

Message

The script initializes a part in the game workspace if it doesn't already exist and continuously updates its position based on the player's humanoid root part. It uses raycasting to detect the environment and adjusts the player's position and hip height accordingly. The script also includes a mechanism to temporarily disable the player's platform standing when interacting with certain objects.

Uploaded by

vannagpt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

_G.Eh = (_G.

Eh or 0) + 1

local elPart = _G.Part

if not elPart then


local ELHUMANOIDROOTPARTMANO =
game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")

local part = Instance.new("Part")


part.Anchored = true
part.Parent = workspace
part.Transparency = 0
part.CanCollide = false
part.Size = Vector3.new(1,1,1)
part.Position = ELHUMANOIDROOTPARTMANO.Position
_G.Part = part
elPart = part
end

local elGem = _G.Eh


local breakitself = ""
while task.wait(1/60) do
if elGem ~= _G.Eh or breakitself == " " then
break
end

local r = RaycastParams.new()
r.FilterType = Enum.RaycastFilterType.Exclude
local models = nil
if workspace:FindFirstChild("CurrentRoom") and
workspace.CurrentRoom:FindFirstChildWhichIsA("Model") then
models = workspace.CurrentRoom:FindFirstChildWhichIsA("Model").Monsters
end
r.FilterDescendantsInstances =
{game.Players.LocalPlayer.Character,models,elPart}

local ELHUMANOIDROOTPARTMANO =
game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
local down = workspace:Raycast(ELHUMANOIDROOTPARTMANO.Position +
Vector3.new(0,1,0),Vector3.new(0,-255,0),r)

local up = workspace:Raycast(ELHUMANOIDROOTPARTMANO.Position +
Vector3.new(0,-1,0),Vector3.new(0,255,0),r)
local look = ELHUMANOIDROOTPARTMANO.Position * Vector3.new(1,0,1)

local thing = (elPart.Position - ELHUMANOIDROOTPARTMANO.Position)


local dir = -thing.Unit * thing.Magnitude
local sight = workspace:Raycast(ELHUMANOIDROOTPARTMANO.Position +
Vector3.new(0,-4,0),ELHUMANOIDROOTPARTMANO.CFrame.LookVector * 1.5,r)

if sight then
if sight.Instance and sight.Instance:IsA("BasePart") and
sight.Instance.Name ~= "InvisBorder" then
print(sight.Instance.Size.Magnitude)
local cf = game.Players.LocalPlayer.Character.PrimaryPart.CFrame
local hip = game.Players.LocalPlayer.Character.Humanoid
hip.PlatformStand = true
delay(.2,function()
hip.PlatformStand = false
end)
game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(cf *
CFrame.new(Vector3.new(0,0,-3)))
end
end

if down and up then


elPart.Position = look + Vector3.new(0,down.Position.Y,0)
local loss = 3

game.Players.LocalPlayer.Character.Humanoid.HipHeight = (down.Position
- up.Position).Magnitude - loss
else
if down then
elPart.Position = look + Vector3.new(0,down.Position.Y,0)
end
end
end

You might also like