does anyone know how to fix this glitch thingy
I tried searching for some solution but nothing helps
so if anyone does know how to fix please help
local char = script.Parent
local sprite = game.StarterGui.Sprite:Clone()
sprite.Adornee = char.HumanoidRootPart
sprite.Parent = char.HumanoidRootPart
local hum = char.Humanoid
local InputService = game:GetService("UserInputService")
local isIdle = true
local isRunning = false
local isFalling = false
local function Flip()
sprite.ImageLabel.ImageRectSize = Vector2.new(-1024,1024)
sprite.ImageLabel.ImageRectOffset = Vector2.new(1024, 0)
end
local function UnFlip()
sprite.ImageLabel.ImageRectSize = Vector2.new(0,0)
sprite.ImageLabel.ImageRectOffset = Vector2.new(0, 0)
end
InputService.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.A then
Flip()
elseif key.KeyCode == Enum.KeyCode.D then
UnFlip()
end
end)
local function Fall()
while isFalling do
sprite.ImageLabel.Image = "rbxassetid://16644920016"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644919781"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644919543"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644919321"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644919068"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644918906"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644918906"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644918548"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644918375"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644918129"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644917843"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644917718"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644917587"
wait(.01)
end
end
local function Jump()
sprite.ImageLabel.Image = "rbxassetid://16644871216"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644871216"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644870714"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644870393"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644870148"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644870148"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644870148"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644869500"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644869170"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644868948"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644868802"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644868615"
end
local function Run()
while isRunning do
sprite.ImageLabel.Image = "rbxassetid://16644691231"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644691072"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644690824"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644690639"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644690436"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644690214"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644689920"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644689693"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644689471"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644689191"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644688858"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644688515"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644688315"
wait(.01)
end
end
local function PreRun()
sprite.ImageLabel.Image = "rbxassetid://16644648238"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644648093"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644647878"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644647661"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644647423"
end
local function Idle()
while isIdle do
sprite.ImageLabel.Image = "rbxassetid://16644089962"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644209832"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644209461"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644209092"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644276222"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644275981"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644275696"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644275563"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644275448"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644275290"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644274941"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644274773"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644274554"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644274350"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644274170"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644274012"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644273843"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644273602"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644273379"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644273123"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644272936"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644272673"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644272542"
wait(.01)
sprite.ImageLabel.Image = "rbxassetid://16644272317"
wait(.01)
end
end
hum:GetPropertyChangedSignal("MoveDirection"):Connect(function()
if hum.MoveDirection.Magnitude > 0 then
isIdle = false
isRunning = true
isFalling = false
PreRun()
wait(.06)
Run()
else
isFalling = false
isRunning = false
isIdle = true
Idle()
end
end)
hum.Jumping:Connect(function()
Jump()
end)
hum.StateChanged:Connect(function(state)
if state == Enum.HumanoidStateType.FallingDown then
isFalling = true
Fall()
isRunning = false
isIdle = false
end
end)
Idle()