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