SHOW:
|
|
- or go back to the newest paste.
1 | script.Parent = nil | |
2 | - | me = game.Players.lotushomerun --Replace lotushomerun with your Roblox username |
2 | + | me = game.Players.BNutty07 --Replace lotushomerun with your Roblox username |
3 | function getparts(path) | |
4 | local parts = {} | |
5 | for _,v in pairs(path:GetChildren()) do | |
6 | if v:IsA("BasePart") then | |
7 | table.insert(parts,v) | |
8 | end | |
9 | for _,k in pairs(v:GetChildren()) do | |
10 | if k:IsA("BasePart") then | |
11 | table.insert(parts,k) | |
12 | end | |
13 | for _,i in pairs(k:GetChildren()) do | |
14 | if i:IsA("BasePart") then | |
15 | table.insert(parts,i) | |
16 | end | |
17 | end | |
18 | end | |
19 | end | |
20 | return parts | |
21 | end | |
22 | ||
23 | ||
24 | function gui() | |
25 | distance = 110 | |
26 | sizemultiplier = 2 | |
27 | ||
28 | dist = distance*sizemultiplier | |
29 | ||
30 | map = Instance.new("ScreenGui",me.PlayerGui) | |
31 | map.Name = "Map" | |
32 | ||
33 | bg = Instance.new("ImageLabel",map) | |
34 | bg.Size = UDim2.new(0,dist*2,0,dist*2) | |
35 | bg.Position = UDim2.new(0.02,0,0.24,0) | |
36 | bg.Image = "http://www.roblox.com/asset/?id=42302151" | |
37 | bg.BackgroundTransparency = 1 | |
38 | ||
39 | ||
40 | mepoint = Instance.new("ImageLabel",bg) | |
41 | mepoint.Size = UDim2.new(0,15,0,15) | |
42 | mepoint.Position = UDim2.new(0.46,0,0.46,0) | |
43 | mepoint.BackgroundTransparency = 1 | |
44 | mepoint.Image = "http://www.roblox.com/asset/?id=42302520" | |
45 | ||
46 | ||
47 | empoint = Instance.new("Frame") | |
48 | empoint.Size = UDim2.new(0,12,0,12) | |
49 | empoint.BorderSizePixel = 0 | |
50 | ||
51 | ||
52 | siz = Instance.new("TextLabel",bg) | |
53 | siz.Size = UDim2.new(0.3,0,0.06,0) | |
54 | siz.Position = UDim2.new(0,0,-0.06,0) | |
55 | siz.Text = "Size multiply" | |
56 | siz.BackgroundColor3 = Color3.new(0.4,0.4,0.4) | |
57 | siz.BackgroundTransparency = 0.6 | |
58 | ||
59 | ||
60 | sizea = Instance.new("TextBox",siz) | |
61 | sizea.Size = UDim2.new(1,0,1,0) | |
62 | sizea.Position = UDim2.new(0,0,1,0) | |
63 | sizea.Text = 2 | |
64 | sizea.BackgroundColor3 = Color3.new(0.4,0.4,0.4) | |
65 | sizea.BackgroundTransparency = 0.6 | |
66 | sizea.Changed:connect(function(prop) | |
67 | if prop == "Text" then | |
68 | sizemultiplier = sizea.Text | |
69 | end | |
70 | end) | |
71 | ||
72 | ||
73 | while true do | |
74 | wait(0.1) | |
75 | local objs = getparts(workspace) | |
76 | for _,v in pairs(objs) do | |
77 | if me.Character:findFirstChild("Head") then | |
78 | local di = (me.Character.Head.Position - v.Position).magnitude | |
79 | if di < dist/(sizemultiplier+0.4) then | |
80 | if v.Size.X < 20 or v.Size.Z < 20 then | |
81 | local pos = me.Character.Head.Position*sizemultiplier | |
82 | local pos2 = v.Position*sizemultiplier | |
83 | local cool1 = -(pos2.X - pos.X) | |
84 | local cool2 = -(pos2.Z - pos.Z) | |
85 | local um = empoint:clone() | |
86 | um.Parent = mepoint | |
87 | local ok1 = v.Size.X*sizemultiplier | |
88 | local ok2 = v.Size.Z*sizemultiplier | |
89 | um.BackgroundColor = v.BrickColor | |
90 | um.BackgroundTransparency = v.Transparency/2 | |
91 | um.Size = UDim2.new(0,ok1,0,ok2) | |
92 | um.Position = UDim2.new(0,cool1-(um.Size.X.Offset/2)+6,0,cool2-(um.Size.Y.Offset/2)+6) | |
93 | coroutine.resume(coroutine.create(function() wait(0.14) um:remove() end)) | |
94 | end | |
95 | end | |
96 | end | |
97 | end | |
98 | end | |
99 | end | |
100 | ||
101 | ||
102 | gui(me) | |
103 | change = function(por) | |
104 | if por == "Character" then | |
105 | gui(me) | |
106 | end | |
107 | end | |
108 | ||
109 | me.Changed:connect(change) |