Advertisement
Filipono120

[ROBLOX] Paper Morph Script v1

Oct 21st, 2020 (edited)
7,249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.73 KB | None | 0 0
  1. --Paper Morph script
  2. --Written by filipaogamer345
  3.  
  4. wait(1 / 60)
  5. --Locals
  6. local plr = game.Players.LocalPlayer
  7. local character = plr.Character
  8. local Action = "Idle";
  9.  
  10. local NetworkAccess = coroutine.create(function()
  11.     settings().Physics.AllowSleep = false
  12.     while true do
  13.         game:GetService('RunService').RenderStepped:Wait()
  14.         for _, players in pairs(game.Players:GetChildren()) do
  15.             if players ~= game.Players.LocalPlayer then
  16.                 players.MaximumSimulationRadius = 0.1
  17.                 players.SimulationRadius = 0
  18.             end
  19.         end
  20.         plr.MaximumSimulationRadius = math.pow(math.huge, math.huge)
  21.         plr.SimulationRadius = math.huge * math.huge
  22.     end
  23. end)
  24. coroutine.resume(NetworkAccess)
  25.  
  26. --Settings
  27. local IdleTexture = "rbxassetid://652834449"
  28. local WalkTexture1 = "rbxassetid://652836663"
  29. local WalkTexture2 = "rbxassetid://652837536"
  30. local JumpTexture = "rbxassetid://652838121"
  31.  
  32. --Morph
  33. local function Morph(Idle, Walk, Walk2, Jump)
  34.     local hum = character.Humanoid
  35.     local humRootPart = character.HumanoidRootPart
  36.    
  37.     for i, v in next, character:GetChildren() do
  38.         if v:IsA("BasePart") then
  39.             v.Transparency = 1
  40.         end
  41.         if v:IsA("Accessory") then
  42.             v:Destroy()
  43.         end
  44.         if v.Name == "Head" then
  45.             v.face.Transparency = 1
  46.         end
  47.     end
  48.    
  49.     local Billboard = Instance.new("BillboardGui", character["HumanoidRootPart"])
  50.     Billboard.AutoLocalize = true
  51.     Billboard.MaxDistance = 30
  52.     Billboard.DistanceStep = math.huge
  53.     Billboard.DistanceLowerLimit = math.huge
  54.     Billboard.DistanceUpperLimit = math.huge
  55.     Billboard.Size = UDim2.new(0, 372, 0, 218)
  56.     local Label = Instance.new("ImageLabel", Billboard)
  57.     Label.BackgroundTransparency = 1
  58.     Label.Image = Idle
  59.     Label.Size = UDim2.new(1, 0, 1, 0)
  60.    
  61.     character.Humanoid.StateChanged:Connect(function(old, new)
  62.         if (new == Enum.HumanoidStateType.Running) then
  63.             Action = "Running"
  64.         elseif (old == Enum.HumanoidStateType.RunningNoPhysics and new == Enum.HumanoidStateType.Running) then
  65.             Action = "Running"
  66.         elseif (new == Enum.HumanoidStateType.Landed) then
  67.             Action = "NaN"
  68.         elseif (new == Enum.HumanoidStateType.Jumping) then
  69.             Action = "Jumping"
  70.         elseif (new == Enum.HumanoidStateType.Freefall) then
  71.             Action = "Jumping"
  72.         elseif (new == Enum.HumanoidStateType.Climbing) then
  73.             Action = "Jumping"
  74.         end
  75.     end)
  76.  
  77.     character.Humanoid.Running:Connect(function(speed)
  78.         if speed <= 0 then
  79.             Action = "Idle"
  80.         end
  81.     end)
  82.    
  83.     while wait() do
  84.         if Action == "Idle" then
  85.             Label.Image = Idle
  86.         elseif Action == "NaN" then
  87.             Label.Image = Idle
  88.         elseif Action == "Running" then
  89.             Label.Image = Walk
  90.             wait(.2)
  91.             Label.Image = Walk2
  92.             wait(.2)
  93.         elseif Action == "Jumping" then
  94.             Label.Image = Jump
  95.         end
  96.     end
  97. end
  98.  
  99. Morph(IdleTexture, WalkTexture1, WalkTexture2, JumpTexture)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement