DrawingJhon

.-.

May 24th, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.85 KB | None | 0 0
  1. --//Tween service\\--
  2. local function BackPart()
  3.     --Part--
  4.     Part = Instance.new("Part", workspace)
  5.     Part.Position = Vector3.new(0, 17, 0)
  6.     Part.Size = Vector3.new(4, 4, 4)
  7.     Part.TopSurface = Enum.SurfaceType.Smooth
  8.     Part.BottomSurface = Enum.SurfaceType.Smooth
  9.     Part.Anchored = true
  10.     Part.Material = Enum.Material.ForceField
  11.     Part.BrickColor = BrickColor.new(0)
  12.     Part.CanCollide = false
  13.     Part.Name = "MyPart"
  14.    
  15.     --Variables--
  16.     local TweenService = game:GetService("TweenService")
  17.     local Part1 = Part
  18.    
  19.     local Info = TweenInfo.new(
  20.         2.5,                        --Duración (segundos)
  21.         Enum.EasingStyle.Back,      --Estilo de movimiento/
  22.         Enum.EasingDirection.Out,   --Estilo de dirección
  23.         0,                          --Cantidad de veces repetidas
  24.         false,                      --Reversa
  25.         0                           --Retraso (segundos)
  26.     )
  27.     local Goals = {
  28.         Position = Vector3.new(0, 2, 0);
  29.     }
  30.    
  31.     local MakePartBiggerTween = TweenService:Create(Part1, Info, Goals)
  32.     MakePartBiggerTween:Play()
  33. end
  34. local Part
  35. local MyPart = Instance.new("Part", workspace)
  36. MyPart.Position = Vector3.new(0, 2, 0)
  37. MyPart.Size = Vector3.new(4, 4, 4)
  38. MyPart.Material = Enum.Material.ForceField
  39. MyPart.TopSurface = Enum.SurfaceType.Smooth
  40. MyPart.BottomSurface = Enum.SurfaceType.Smooth
  41. MyPart.BrickColor = BrickColor.new(0)
  42. MyPart.Anchored = true
  43. MyPart.Name = "MyPart"
  44. --[[
  45. local loop
  46. local comprobation = true
  47.  
  48. for i, v in pairs(game.Players:GetChildren()) do
  49.     if v.Name == "JhonXD2006" then
  50.         if comprobation == true then
  51.             loop = true
  52.             comprobation = false
  53.         end
  54.     else
  55.         loop = false
  56.         comprobation = true
  57.     end
  58. end]]
  59.        
  60. while wait(0.5) do
  61.     if workspace:findFirstChild("MyPart") then
  62.         exist = true
  63.     else
  64.         exist = false
  65.     end
  66.     if exist == false then
  67.         BackPart()
  68.         wait(2.25)
  69.         if workspace:findFirstChild("MyPart") then
  70.             workspace:WaitForChild("MyPart").CanCollide = true
  71.         end
  72.     end
  73. end
Add Comment
Please, Sign In to add comment