Advertisement
DropSquad

UFO Script Jimmy

Mar 14th, 2015
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.25 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Mouse = Player:GetMouse()
  3. repeat wait() until Player.Character
  4. local MyCharacter = Player.Character
  5. local Torso = MyCharacter.Torso
  6. local Model = Instance.new('Model')
  7. Model.Name = 'UFO_' .. Player.Name
  8. local Base = Instance.new('Part', Model)
  9. Base.Name = 'UFOBase'
  10. Base.BrickColor = BrickColor.Black()
  11. Base.Anchored = true
  12. Base.Size = Vector3.new(8, 1, 8)
  13. Base.FormFactor = Enum.FormFactor.Custom
  14. local Cylinder = Instance.new('CylinderMesh', Base)
  15. Cylinder.Name = 'CylinderShape'
  16. local Beam = Instance.new('Part', Model)
  17. Beam.Transparency = 0.5
  18. Beam.BrickColor = BrickColor.Yellow()
  19. Beam.Parent = Model
  20. Beam.Size = Vector3.new(8, 500, 8)
  21. Beam.FormFactor = Enum.FormFactor.Custom
  22. Beam.CanCollide = false
  23. Beam.Anchored = true
  24. local Cylinder2 = Instance.new('CylinderMesh', Beam)
  25. Cylinder2.Name = 'CylinderShape'
  26. Model.PrimaryPart = Base
  27. Model.Parent = MyCharacter
  28. local Mode = 'Teleport'
  29. local RunService = game:GetService('RunService')
  30. local IgnoreY = true
  31. local SetY = 0
  32. local Enabled = true
  33. local Debounce = false
  34. local Expire = 20
  35.  
  36. local function rotate(UFO, Center)
  37.     UFO:WaitForChild('Base')
  38.     UFO:WaitForChild('Beam')
  39.     for Value = 1, (Expire * 30) do
  40.         wait()
  41.         if UFO then
  42.             local Radius = Center.Size.X * 1.2
  43.             UFO.Beam.Transparency = Beam.Transparency
  44.             UFO.Beam.BrickColor = Beam.BrickColor
  45.             UFO.Beam.CFrame = UFO.Base.CFrame * CFrame.new(0, -UFO.Beam.Size.Y / 2 - 0.5, 0)
  46.             UFO.Base.Material = Base.Material
  47.             UFO.Base.BrickColor = Base.BrickColor
  48.             UFO:SetPrimaryPartCFrame(Center.CFrame * CFrame.new(Radius * math.sin(math.rad(Value)), 0, Radius * math.cos(math.rad(Value))))
  49.         end
  50.     end
  51.     UFO:Destroy()
  52. end
  53.  
  54. local function onChatted(message)
  55.     if message:sub(1, 5):lower() == '/spd ' then
  56.         local speed = message:sub(6)
  57.         if tonumber(speed) then
  58.             Base.Size = Vector3.new(speed / 2, 1, speed / 2)
  59.             MyCharacter.Humanoid.WalkSpeed = speed
  60.         end
  61.     elseif message:sub(1, 4):lower() == '/vpr' then
  62.         Mode = 'Vaporize'
  63.         Beam.BrickColor = BrickColor.Red()
  64.     elseif message:sub(1, 4):lower() == '/frz' then
  65.         Mode = 'Freeze'
  66.         Beam.BrickColor = BrickColor.Blue()
  67.     elseif message:sub(1, 4):lower() == '/thw' then
  68.         Mode = 'Thaw'
  69.         Beam.BrickColor = BrickColor.Green()
  70.     elseif message:sub(1, 3):lower() == '/tp' then
  71.         Mode = 'Teleport'
  72.         Beam.BrickColor = BrickColor.Yellow()
  73.     elseif message:sub(1, 3):lower() == '/jl' then
  74.         Mode = 'Jail'
  75.         Beam.BrickColor = BrickColor.Black()
  76.     elseif message:sub(1, 2):lower() == '/e' then
  77.         Enabled = not Enabled
  78.         Beam.Transparency = Enabled and 0.5 or 1
  79.     elseif message:sub(1, 5):lower() == '/clr ' then
  80.         local color = message:sub(6)
  81.         Base.BrickColor = BrickColor.new(color)
  82.     elseif message:sub(1, 6):lower() == '/camo ' then
  83.         local BasePlate = workspace:FindFirstChild(message:sub(7))
  84.         if BasePlate and BasePlate:IsA('BasePart') then
  85.             Base.Transparency = BasePlate.Transparency
  86.             Base.Material = BasePlate.Material
  87.             Base.BrickColor = BasePlate.BrickColor
  88.         end
  89.     elseif message:sub(1, 7):lower() == '/uncamo' then
  90.         Base.Transparency = 0
  91.         Base.Material = Enum.Material.Plastic
  92.         Base.BrickColor = BrickColor.Black()
  93.     elseif message:sub(1, 8):lower() == '/setexp ' then
  94.         local number = message:sub(9)
  95.         if tonumber(number) then
  96.             Expire = tonumber(number)
  97.         end
  98.     elseif message:sub(1, 6):lower() == '/drop ' then
  99.         local number = message:sub(7)
  100.         if tonumber(number) then
  101.             MyCharacter:MoveTo(MyCharacter:GetModelCFrame().p - tonumber(number))
  102.         end
  103.     elseif message:sub(1, 4):lower() == '/drn' then
  104.         local Storage = Instance.new('Model')
  105.         Storage.Name = 'UFOSpawn'
  106.         local Clone = Base:Clone()
  107.         Clone.Parent = Storage
  108.         Clone.Name = 'Base'
  109.         local CloneBeam = Instance.new('Part', Storage)
  110.         CloneBeam.Name = 'Beam'
  111.         CloneBeam.Transparency = Beam.Transparency
  112.         CloneBeam.BrickColor = Beam.BrickColor
  113.         CloneBeam.Size = Beam.Size
  114.         CloneBeam.FormFactor = Enum.FormFactor.Custom
  115.         CloneBeam.CanCollide = Beam.CanCollide
  116.         CloneBeam.Anchored = Beam.Anchored
  117.         Instance.new('CylinderMesh').Parent = CloneBeam
  118.         Storage.PrimaryPart = Clone
  119.         Storage.Parent = Model
  120.         wait()
  121.         CloneBeam.Touched:connect(beamTouched)
  122.         spawn(function()
  123.             rotate(Storage, Base)
  124.         end)
  125.     elseif message:sub(1, 7) == '/clrdrn' then
  126.         for Index, Child in next, Model:GetChildren() do
  127.             if Child:IsA('Model') and Child.Name == 'UFOSpawn' then
  128.                 Child:Destroy()
  129.             end
  130.         end
  131.     end
  132. end
  133.  
  134.  
  135. function beamTouched(hit)
  136.     if not Enabled then return end
  137.     if Debounce then return end Debounce = true
  138.     if hit:IsDescendantOf(MyCharacter) then return end
  139.     local Character = hit and hit.Parent
  140.     if Character:FindFirstChild('Humanoid') and Character:FindFirstChild('Torso') then
  141.         if Mode == 'Teleport' then
  142.             Character.Torso.CFrame = Torso.CFrame * CFrame.new(0, 0, 1.5)
  143.         elseif Mode == 'Vaporize' then
  144.             for Index, Instance in next, Character:GetChildren() do
  145.                 if Instance:IsA('BasePart') then
  146.                     spawn(function()
  147.                         Instance.BrickColor = BrickColor.Black()
  148.                         local Start = Instance.Transparency
  149.                         for a = 0, 1, 0.1 do
  150.                             Instance.Transparency = a * (1 - Start) + Start
  151.                             wait()
  152.                         end
  153.                         Instance:Destroy()
  154.                     end)
  155.                 end
  156.             end
  157.         elseif Mode == 'Freeze' then
  158.             for Index, Instance in next, Character:GetChildren() do
  159.                 if Instance:IsA('BasePart') and Instance.name ~= 'HumanoidRootPart' then
  160.                     Instance.Anchored = true
  161.                     Instance.BrickColor = BrickColor.Blue()
  162.                     Instance.Reflectance = 0.3
  163.                     Instance.Transparency = 0.4
  164.                 end
  165.             end
  166.         elseif Mode == 'Thaw' then
  167.             local Color = BrickColor.Yellow()
  168.             for Index, Instance in next, Character:GetChildren() do
  169.                 if Instance:IsA('BasePart') and Instance.Anchored and Instance.Reflectance == 0.3 then
  170.                     if Character:FindFirstChild('Body Colors') then
  171.                         Color = Character['Body Colors'][Instance.Name] or BrickColor.Yellow()
  172.                     end
  173.                     Instance.Anchored = false
  174.                     Instance.BrickColor = Color
  175.                     Instance.Reflectance = 0
  176.                     Instance.Transparency = 0
  177.                 end
  178.             end
  179.         elseif Mode == 'Jail' then
  180.             if not Character:FindFirstChild('Cell') then
  181.                 local Cell = Instance.new('Model')
  182.                 Cell.Name = 'Cell'
  183.                 local Center = Character.Torso.Position
  184.                 local Top = Instance.new('Part', Cell)
  185.                 Top.Size = Vector3.new(12, 1, 12)
  186.                 Top.FormFactor = Enum.FormFactor.Custom
  187.                 Top.BrickColor = BrickColor.Black()
  188.                 Top.Anchored = true
  189.                 Top.CFrame = CFrame.new(Center) * CFrame.new(0, 5, 0)
  190.                 local Mesh = Instance.new('CylinderMesh')
  191.                 Mesh.Parent = Top
  192.                 local Bottom = Top:Clone()
  193.                 Bottom.Parent = Cell
  194.                 Bottom.CFrame = CFrame.new(Center) * CFrame.new(0, -3.5, 0)
  195.                 for Value = 1, 360 do
  196.                     local Angle = math.rad(Value)
  197.                     if math.fmod(Value, 24) == 0 then
  198.                         local part = Instance.new('Part')
  199.                         part.FormFactor = Enum.FormFactor.Custom
  200.                         part.BrickColor = BrickColor.Black()
  201.                         part.Anchored = true
  202.                         part.Size = Vector3.new(1, 8, 1)
  203.                         Instance.new('CylinderMesh', part).Scale = Vector3.new(0.9, 1, 0.9)
  204.                         part.CFrame = CFrame.new(Center) * CFrame.new(5 * math.sin(Angle), 0.5, 5 * math.cos(Angle))
  205.                         part.Parent = Cell
  206.                     end
  207.                 end
  208.                 Cell.Parent = Character
  209.             else
  210.                 Character.Cell:Destroy()
  211.             end
  212.         end
  213.     end
  214.     wait(0.5)
  215.     Debounce = false
  216. end
  217.  
  218. local function renderStepped()
  219.     local Position = Torso.Position
  220.     local Size = Torso.Size
  221.     local Humanoid = MyCharacter.Humanoid
  222.     Base.Size = Vector3.new(Humanoid.WalkSpeed / 2, 1, Humanoid.WalkSpeed / 2)
  223.     Base.CFrame = CFrame.new(Vector3.new(Position.X, IgnoreY and SetY or Position.Y - 3, Position.Z)) * CFrame.new(0, -Size.Y / 2, 0)
  224.     if not IgnoreY then
  225.         SetY = Base.Position.Y
  226.     end
  227.     Beam.CFrame = Base.CFrame * CFrame.new(0, -Beam.Size.Y / 2 - 0.5, 0)
  228. end
  229.  
  230. Mouse.KeyDown:connect(function(Key)
  231.     if Key == 'n' then
  232.         RunService:UnbindFromRenderStep('UFORun')
  233.         Base.CFrame = Base.CFrame * CFrame.new(0, -2, 0)
  234.         SetY = Base.Position.Y
  235.         RunService:BindToRenderStep('UFORun', 1, renderStepped)
  236.     end
  237. end)
  238.  
  239. MyCharacter.Humanoid.Changed:connect(function()
  240.     if MyCharacter.Humanoid.Jump then
  241.         IgnoreY = false
  242.     else
  243.         IgnoreY = true
  244.     end
  245. end)
  246.  
  247. wait(1)
  248.  
  249. Beam.Touched:connect(beamTouched)
  250. Player.Chatted:connect(onChatted)
  251.  
  252. RunService:BindToRenderStep('UFORun', 1, renderStepped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement