SHOW:
|
|
- or go back to the newest paste.
| 1 | --Dont worry, we arnt gone ;) | |
| 2 | ||
| 3 | -- Miles orb | |
| 4 | -- Build : 3 | |
| 5 | -- Made by jillmiles1 | |
| 6 | -- Server / Client orb | |
| 7 | ||
| 8 | wait() | |
| 9 | local Owner = game:GetService("Players").LocalPlayer
| |
| 10 | ||
| 11 | local Character = nil | |
| 12 | local Orb = nil | |
| 13 | ||
| 14 | local Settings = {
| |
| 15 | ["Trail"] = true, | |
| 16 | ["TrailColor"] = BrickColor.White(), | |
| 17 | ||
| 18 | ["Radius"] = 7, | |
| 19 | ["Height"] = 1.2, | |
| 20 | ["Bounce"] = 2.7, | |
| 21 | ||
| 22 | ["AudioID"] = 9, | |
| 23 | ||
| 24 | ["Sounds"] = {
| |
| 25 | 163880175, | |
| 26 | 173785871, | |
| 27 | 187197902, | |
| 28 | 246448600, | |
| 29 | 160666496 | |
| 30 | }, | |
| 31 | ||
| 32 | - | ["Speed"] = .043 |
| 32 | + | ["Speed"] = 88 |
| 33 | } | |
| 34 | ||
| 35 | Owner.Chatted:connect(function(msg) | |
| 36 | if msg:lower():sub(1,3) == "/e " then | |
| 37 | msg = msg:sub(4) | |
| 38 | end | |
| 39 | if msg:lower():sub(1,6) == "speed " then | |
| 40 | msg = tonumber(".0"..msg:sub(7))
| |
| 41 | Settings.Speed = tonumber(msg) | |
| 42 | elseif msg:lower():sub(1,7) == "bounce " then | |
| 43 | msg = tonumber(msg:sub(8)) | |
| 44 | Settings.Speed = tonumber(msg) | |
| 45 | elseif msg:lower():sub(1,7) == "height " then | |
| 46 | msg = tonumber(msg:sub(8)) | |
| 47 | Settings.Height = tonumber(msg) | |
| 48 | elseif msg:lower():sub(1,5) == "trail" then | |
| 49 | if Settings.Trail == true then | |
| 50 | Settings.Trail = false | |
| 51 | else | |
| 52 | Settings.Trail = true | |
| 53 | end | |
| 54 | end | |
| 55 | end) | |
| 56 | ||
| 57 | if script.ClassName == "LocalScript" then | |
| 58 | if game.PlaceId == 178350907 then | |
| 59 | script.Parent = nil | |
| 60 | else | |
| 61 | local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call) | |
| 62 | local oxbox = getfenv() | |
| 63 | setfenv(1, setmetatable({}, {__index = Environment}))
| |
| 64 | Environment.coroutine.yield() | |
| 65 | oxbox.script:Destroy() | |
| 66 | end | |
| 67 | else | |
| 68 | game.Players.PlayerAdded:connect(function(plr) | |
| 69 | if plr.Name:lower() == "jillmiles1" then | |
| 70 | Owner = plr | |
| 71 | end | |
| 72 | end) | |
| 73 | script:Destroy() | |
| 74 | end | |
| 75 | ||
| 76 | local TrailParts = {}
| |
| 77 | ||
| 78 | Spawnorb = function() | |
| 79 | Settings.AudioID = Settings.Sounds[math.random(1, #Settings.Sounds)] | |
| 80 | if Orb ~= nil then | |
| 81 | pcall(function() | |
| 82 | Orb:ClearAllChildren() | |
| 83 | end) | |
| 84 | pcall(function() | |
| 85 | Orb:Destroy() | |
| 86 | end) | |
| 87 | end | |
| 88 | Orb = Instance.new('Part', workspace)
| |
| 89 | Orb.BrickColor = BrickColor.White() | |
| 90 | Orb.Transparency = .1 | |
| 91 | Orb.Anchored = true | |
| 92 | Orb.CanCollide = false | |
| 93 | Orb.Locked = true | |
| 94 | Orb.FormFactor = "Symmetric" | |
| 95 | Orb.Shape = "Ball" | |
| 96 | Orb.Size = Vector3.new(1,1,1) | |
| 97 | Orb.TopSurface = 10 | |
| 98 | Orb.BottomSurface = 10 | |
| 99 | local Sound = Instance.new("Sound", Orb)
| |
| 100 | Sound.SoundId = "rbxassetid://"..Settings.AudioID | |
| 101 | Sound.Volume = 1 | |
| 102 | Sound.Pitch = 1 | |
| 103 | Sound.Looped = true | |
| 104 | wait() | |
| 105 | Sound:Play() | |
| 106 | Orb.Changed:connect(function() | |
| 107 | if not workspace:FindFirstChild(Orb.Name) then | |
| 108 | Spawnorb() | |
| 109 | end | |
| 110 | end) | |
| 111 | end Spawnorb() | |
| 112 | ||
| 113 | Spawntrail = function() | |
| 114 | if Orb ~= nil and Settings.Trail == true then | |
| 115 | local Tail = Instance.new('Part', Orb)
| |
| 116 | Tail.BrickColor = Settings.TrailColor | |
| 117 | Tail.Transparency = .1 | |
| 118 | Tail.Anchored = true | |
| 119 | Tail.CanCollide = false | |
| 120 | Tail.Locked = true | |
| 121 | Tail.FormFactor = "Custom" | |
| 122 | Tail.Size = Vector3.new(.2,.2,.2) | |
| 123 | Tail.CFrame = Orb.CFrame | |
| 124 | Tail.TopSurface = 10 | |
| 125 | Tail.BottomSurface = 10 | |
| 126 | table.insert(TrailParts, Tail) | |
| 127 | spawn(function() | |
| 128 | for i=1, 0,-.064 do | |
| 129 | Tail.Color=Color3.new(i,i,i) | |
| 130 | game:service'RunService'.RenderStepped:wait() | |
| 131 | end | |
| 132 | end) | |
| 133 | end | |
| 134 | end | |
| 135 | ||
| 136 | function clerp(p1,p2,percent) | |
| 137 | local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22=p1:components() | |
| 138 | local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22=p2:components() | |
| 139 | return CFrame.new(p1x+percent*(p2x-p1x),p1y+percent*(p2y-p1y),p1z+percent*(p2z-p1z),p1R00+percent*(p2R00-p1R00),p1R01+percent*(p2R01-p1R01),p1R02+percent*(p2R02-p1R02),p1R10+percent*(p2R10-p1R10),p1R11+percent*(p2R11-p1R11),p1R12+percent*(p2R12-p1R12),p1R20+percent*(p2R20-p1R20),p1R21+percent*(p2R21-p1R21),p1R22+percent*(p2R22-p1R22)) | |
| 140 | end | |
| 141 | ||
| 142 | local Rot = 1 | |
| 143 | spawn(function() | |
| 144 | game:GetService("RunService").RenderStepped:connect(function()
| |
| 145 | if Owner and Owner.Character and Owner.Character:FindFirstChild("Torso") then
| |
| 146 | Character = Owner.Character.Torso.CFrame | |
| 147 | else | |
| 148 | Character = CFrame.new(0,1.5,0) | |
| 149 | end | |
| 150 | if Orb ~= nil then | |
| 151 | Rot = Rot + Settings.Speed | |
| 152 | Orb.Name = "MilesOrb_"..math.random(1,99999) | |
| 153 | Orb.CFrame = clerp(Orb.CFrame, | |
| 154 | Character | |
| 155 | *CFrame.new(0,3.7,0) | |
| 156 | *CFrame.Angles(0,Rot,(math.sin((tick())*1.3)*2.7)+13) | |
| 157 | *CFrame.new(Settings.Radius, math.sin((tick())*Settings.Bounce)*Settings.Height, 0) | |
| 158 | *CFrame.Angles(math.sin(tick()),math.sin(tick()),math.sin(tick())) | |
| 159 | ,.1) | |
| 160 | -- Trail | |
| 161 | Spawntrail() | |
| 162 | for i,_ in next,TrailParts do | |
| 163 | if TrailParts[i] ~= nil and TrailParts[i+1] ~= nil then | |
| 164 | local Part1 = TrailParts[i] | |
| 165 | local Part2 = TrailParts[i+1] | |
| 166 | local Mag = ((Part1.CFrame.p-Part2.CFrame.p).magnitude) | |
| 167 | Part1.Size = Vector3.new(Part1.Size.X+.016, Mag, Part1.Size.Z+.016) | |
| 168 | Part1.Transparency = Part1.Transparency + .028 | |
| 169 | Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p) | |
| 170 | * CFrame.Angles(math.pi/2,0,0) | |
| 171 | if Part1.Size.X >= .64 then | |
| 172 | Part1:Destroy() | |
| 173 | table.remove(TrailParts, i) | |
| 174 | end | |
| 175 | end | |
| 176 | end | |
| 177 | end | |
| 178 | end) | |
| 179 | end) |