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, |
15 | + | ["Trail"] = false, |
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"] = .020 |
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 |
69 | + | if plr.Name:lower() == "iiXynx" 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" |
94 | + | Orb.FormFactor = "Brick" |
95 | - | Orb.Shape = "Ball" |
95 | + | |
96 | Orb.TopSurface = 10 | |
97 | Orb.BottomSurface = 10 | |
98 | local Sound = Instance.new("Sound", Orb) | |
99 | Sound.SoundId = "rbxassetid://"..Settings.AudioID | |
100 | Sound.Volume = 1 | |
101 | Sound.Pitch = 1 | |
102 | Sound.Looped = true | |
103 | wait() | |
104 | Sound:Play() | |
105 | Orb.Changed:connect(function() | |
106 | if not workspace:FindFirstChild(Orb.Name) then | |
107 | Spawnorb() | |
108 | end | |
109 | end) | |
110 | end Spawnorb() | |
111 | ||
112 | Spawntrail = function() | |
113 | if Orb ~= nil and Settings.Trail == true then | |
114 | local Tail = Instance.new('Part', Orb) | |
115 | Tail.BrickColor = Settings.TrailColor | |
116 | Tail.Transparency = .1 | |
117 | Tail.Anchored = true | |
118 | Tail.CanCollide = false | |
119 | Tail.Locked = true | |
120 | Tail.FormFactor = "Custom" | |
121 | Tail.Size = Vector3.new(.2,.2,.2) | |
122 | Tail.CFrame = Orb.CFrame | |
123 | Tail.TopSurface = 10 | |
124 | Tail.BottomSurface = 10 | |
125 | table.insert(TrailParts, Tail) | |
126 | spawn(function() | |
127 | for i=1, 0,-.064 do | |
128 | Tail.Color=Color3.new(i,i,i) | |
129 | game:service'RunService'.RenderStepped:wait() | |
130 | end | |
131 | end) | |
132 | end | |
133 | end | |
134 | ||
135 | function clerp(p1,p2,percent) | |
136 | local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22=p1:components() | |
137 | local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22=p2:components() | |
138 | 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)) | |
139 | end | |
140 | ||
141 | local Rot = 1 | |
142 | spawn(function() | |
143 | game:GetService("RunService").RenderStepped:connect(function() | |
144 | if Owner and Owner.Character and Owner.Character:FindFirstChild("Torso") then | |
145 | Character = Owner.Character.Torso.CFrame | |
146 | else | |
147 | Character = CFrame.new(0,1.5,0) | |
148 | end | |
149 | if Orb ~= nil then | |
150 | Rot = Rot + Settings.Speed | |
151 | Orb.Name = "MilesOrb_"..math.random(1,99999) | |
152 | Orb.CFrame = clerp(Orb.CFrame, | |
153 | Character | |
154 | *CFrame.new(0,3.7,0) | |
155 | *CFrame.Angles(0,Rot,(math.sin((tick())*1.3)*2.7)+13) | |
156 | *CFrame.new(Settings.Radius, math.sin((tick())*Settings.Bounce)*Settings.Height, 0) | |
157 | *CFrame.Angles(math.sin(tick()),math.sin(tick()),math.sin(tick())) | |
158 | ,.1) | |
159 | -- Trail | |
160 | Spawntrail() | |
161 | for i,_ in next,TrailParts do | |
162 | if TrailParts[i] ~= nil and TrailParts[i+1] ~= nil then | |
163 | local Part1 = TrailParts[i] | |
164 | local Part2 = TrailParts[i+1] | |
165 | local Mag = ((Part1.CFrame.p-Part2.CFrame.p).magnitude) | |
166 | Part1.Size = Vector3.new(Part1.Size.X+.016, Mag, Part1.Size.Z+.016) | |
167 | Part1.Transparency = Part1.Transparency + .028 | |
168 | Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p) | |
169 | * CFrame.Angles(math.pi/2,0,0) | |
170 | if Part1.Size.X >= .64 then | |
171 | Part1:Destroy() | |
172 | table.remove(TrailParts, i) | |
173 | end | |
174 | end | |
175 | end | |
176 | end | |
177 | end) | |
178 | end) |