SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
3 | do | |
4 | print("FE Compatibility code by Mokiros") | |
5 | script.Parent = Player.Character | |
6 | ||
7 | --RemoteEvent for communicating | |
8 | local Event = Instance.new("RemoteEvent") | |
9 | Event.Name = "UserInput_Event" | |
10 | ||
11 | --Fake event to make stuff like Mouse.KeyDown work | |
12 | local function fakeEvent() | |
13 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
14 | t.connect = t.Connect | |
15 | return t | |
16 | end | |
17 | ||
18 | --Creating fake input objects with fake variables | |
19 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
20 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
21 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
22 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
23 | end} | |
24 | --Merged 2 functions into one by checking amount of arguments | |
25 | CAS.UnbindAction = CAS.BindAction | |
26 | ||
27 | --This function will trigger the events that have been :Connect()'ed | |
28 | local function te(self,ev,...) | |
29 | local t = m[ev] | |
30 | if t and t._fakeEvent and t.Function then | |
31 | t.Function(...) | |
32 | end | |
33 | end | |
34 | m.TrigEvent = te | |
35 | UIS.TrigEvent = te | |
36 | ||
37 | Event.OnServerEvent:Connect(function(plr,io) | |
38 | if plr~=Player then return end | |
39 | if io.isMouse then | |
40 | m.Target = io.Target | |
41 | m.Hit = io.Hit | |
42 | else | |
43 | local b = io.UserInputState == Enum.UserInputState.Begin | |
44 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
45 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
46 | end | |
47 | for _,t in pairs(CAS.Actions) do | |
48 | for _,k in pairs(t.Keys) do | |
49 | if k==io.KeyCode then | |
50 | t.Function(t.Name,io.UserInputState,io) | |
51 | end | |
52 | end | |
53 | end | |
54 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
55 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
56 | end | |
57 | end) | |
58 | Event.Parent = NLS([==[ | |
59 | local Player = game:GetService("Players").LocalPlayer | |
60 | local Event = script:WaitForChild("UserInput_Event") | |
61 | ||
62 | local UIS = game:GetService("UserInputService") | |
63 | local input = function(io,a) | |
64 | if a then return end | |
65 | --Since InputObject is a client-side instance, we create and pass table instead | |
66 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
67 | end | |
68 | UIS.InputBegan:Connect(input) | |
69 | UIS.InputEnded:Connect(input) | |
70 | ||
71 | local Mouse = Player:GetMouse() | |
72 | local h,t | |
73 | --Give the server mouse data 30 times every second, but only if the values changed | |
74 | --If player is not moving their mouse, client won't fire events | |
75 | while wait(1/30) do | |
76 | if h~=Mouse.Hit or t~=Mouse.Target then | |
77 | h,t=Mouse.Hit,Mouse.Target | |
78 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
79 | end | |
80 | end]==],Player.Character) | |
81 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
82 | end | |
83 | ||
84 | local plrs = game:GetService("Players") | |
85 | local plr = owner | |
86 | local char = plr.Character | |
87 | local tweenserv = game:GetService("TweenService") | |
88 | local lighting = game:GetService("Lighting") | |
89 | local hum = char:FindFirstChildOfClass("Humanoid") | |
90 | local tor = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso") | |
91 | local root = char:FindFirstChild("HumanoidRootPart") | |
92 | local head = char:FindFirstChild("Head") | |
93 | local face = head:FindFirstChildOfClass("Decal") | |
94 | local larm = char:FindFirstChild("Left Arm") or char:FindFirstChild("LeftUpperArm") | |
95 | local rarm = char:FindFirstChild("Right Arm") or char:FindFirstChild("RightUpperArm") | |
96 | local rleg = char:FindFirstChild("Right Leg") or char:FindFirstChild("RightUpperLeg") | |
97 | local lleg = char:FindFirstChild("Left Leg") or char:FindFirstChild("LeftUpperLeg") | |
98 | local neck = tor:FindFirstChild("Neck") | |
99 | local rootj = root:FindFirstChild("RootJoint") | |
100 | local LS = tor:FindFirstChild("Left Shoulder") | |
101 | local RS = tor:FindFirstChild("Right Shoulder") | |
102 | local LH = tor:FindFirstChild("Left Hip") | |
103 | local RH = tor:FindFirstChild("Right Hip") | |
104 | local bp = plr:FindFirstChild("Backpack") | |
105 | local cam = workspace.CurrentCamera | |
106 | ||
107 | hum:ClearAllChildren() | |
108 | char.Animate:remove() | |
109 | ||
110 | --Converted with ttyyuu12345's model to script plugin v4 | |
111 | function sandbox(var,func) | |
112 | local env = getfenv(func) | |
113 | local newenv = setmetatable({},{ | |
114 | __index = function(self,k) | |
115 | if k=="script" then | |
116 | return var | |
117 | else | |
118 | return env[k] | |
119 | end | |
120 | end, | |
121 | }) | |
122 | setfenv(func,newenv) | |
123 | return func | |
124 | end | |
125 | cors = {} | |
126 | mas = Instance.new("Model",game:GetService("Lighting")) | |
127 | Model0 = Instance.new("Model") | |
128 | Model1 = Instance.new("Model") | |
129 | Part2 = Instance.new("Part") | |
130 | ManualWeld3 = Instance.new("ManualWeld") | |
131 | Part4 = Instance.new("Part") | |
132 | ManualWeld5 = Instance.new("ManualWeld") | |
133 | Part6 = Instance.new("Part") | |
134 | ManualWeld7 = Instance.new("ManualWeld") | |
135 | Part8 = Instance.new("Part") | |
136 | ManualWeld9 = Instance.new("ManualWeld") | |
137 | Part10 = Instance.new("Part") | |
138 | ManualWeld11 = Instance.new("ManualWeld") | |
139 | Model12 = Instance.new("Model") | |
140 | Part13 = Instance.new("Part") | |
141 | ManualWeld14 = Instance.new("ManualWeld") | |
142 | Part15 = Instance.new("Part") | |
143 | ManualWeld16 = Instance.new("ManualWeld") | |
144 | Part17 = Instance.new("Part") | |
145 | ManualWeld18 = Instance.new("ManualWeld") | |
146 | Part19 = Instance.new("Part") | |
147 | ManualWeld20 = Instance.new("ManualWeld") | |
148 | Part21 = Instance.new("Part") | |
149 | ManualWeld22 = Instance.new("ManualWeld") | |
150 | Part23 = Instance.new("Part") | |
151 | ManualWeld24 = Instance.new("ManualWeld") | |
152 | Part25 = Instance.new("Part") | |
153 | ManualWeld26 = Instance.new("ManualWeld") | |
154 | Part27 = Instance.new("Part") | |
155 | ManualWeld28 = Instance.new("ManualWeld") | |
156 | Part29 = Instance.new("Part") | |
157 | ManualWeld30 = Instance.new("ManualWeld") | |
158 | Part31 = Instance.new("Part") | |
159 | ManualWeld32 = Instance.new("ManualWeld") | |
160 | Part33 = Instance.new("Part") | |
161 | ManualWeld34 = Instance.new("ManualWeld") | |
162 | Part35 = Instance.new("Part") | |
163 | ManualWeld36 = Instance.new("ManualWeld") | |
164 | Part37 = Instance.new("Part") | |
165 | ManualWeld38 = Instance.new("ManualWeld") | |
166 | Part39 = Instance.new("Part") | |
167 | ManualWeld40 = Instance.new("ManualWeld") | |
168 | Part41 = Instance.new("Part") | |
169 | ManualWeld42 = Instance.new("ManualWeld") | |
170 | Part43 = Instance.new("Part") | |
171 | ManualWeld44 = Instance.new("ManualWeld") | |
172 | Part45 = Instance.new("Part") | |
173 | ManualWeld46 = Instance.new("ManualWeld") | |
174 | Part47 = Instance.new("Part") | |
175 | ManualWeld48 = Instance.new("ManualWeld") | |
176 | Part49 = Instance.new("Part") | |
177 | Model0.Name = "fruitgun" | |
178 | Model0.Parent = mas | |
179 | Model1.Name = "placer2" | |
180 | Model1.Parent = Model0 | |
181 | Part2.Name = "boltb" | |
182 | Part2.Parent = Model1 | |
183 | Part2.Material = Enum.Material.Glass | |
184 | Part2.BrickColor = BrickColor.new("Gold") | |
185 | Part2.Rotation = Vector3.new(-180, 0, -45) | |
186 | Part2.CanCollide = false | |
187 | Part2.Shape = Enum.PartType.Cylinder | |
188 | Part2.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
189 | Part2.CFrame = CFrame.new(-159.454483, 116.303047, -62.8337746, 0.70710665, 0.707106769, 6.18172464e-08, 0.70710659, -0.707106471, 6.1817218e-08, 8.74227766e-08, 0, -0.99999994) | |
190 | Part2.BottomSurface = Enum.SurfaceType.Smooth | |
191 | Part2.TopSurface = Enum.SurfaceType.Smooth | |
192 | Part2.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
193 | Part2.Position = Vector3.new(-159.454483, 116.303047, -62.8337746) | |
194 | Part2.Orientation = Vector3.new(0, 180, 135) | |
195 | Part2.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
196 | ManualWeld3.Name = "Weld" | |
197 | ManualWeld3.Parent = Part2 | |
198 | ManualWeld3.C0 = CFrame.new(0, 0, 0, 0.70710665, 0.707106769, 8.74227695e-08, 0.707106769, -0.70710665, 0, 6.18172393e-08, 6.18172393e-08, -0.99999994) | |
199 | ManualWeld3.C1 = CFrame.new(0.800003052, 0.403038025, 0.403045654, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
200 | ManualWeld3.Part0 = Part2 | |
201 | ManualWeld3.Part1 = Part21 | |
202 | Part4.Name = "boltl" | |
203 | Part4.Parent = Model1 | |
204 | Part4.Material = Enum.Material.Glass | |
205 | Part4.BrickColor = BrickColor.new("Gold") | |
206 | Part4.Rotation = Vector3.new(180, 0, 45) | |
207 | Part4.CanCollide = false | |
208 | Part4.Shape = Enum.PartType.Cylinder | |
209 | Part4.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
210 | Part4.CFrame = CFrame.new(-160.260574, 116.303055, -62.8337746, 0.707106709, -0.707106709, 6.18172393e-08, -0.707106531, -0.707106531, -6.1817218e-08, 8.74227766e-08, 0, -1) | |
211 | Part4.BottomSurface = Enum.SurfaceType.Smooth | |
212 | Part4.TopSurface = Enum.SurfaceType.Smooth | |
213 | Part4.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
214 | Part4.Position = Vector3.new(-160.260574, 116.303055, -62.8337746) | |
215 | Part4.Orientation = Vector3.new(0, 180, -135) | |
216 | Part4.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
217 | ManualWeld5.Name = "Weld" | |
218 | ManualWeld5.Parent = Part4 | |
219 | ManualWeld5.C0 = CFrame.new(0, 0, 0, 0.707106709, -0.707106709, 8.74227766e-08, -0.707106709, -0.707106709, 0, 6.18172393e-08, -6.18172393e-08, -1) | |
220 | ManualWeld5.C1 = CFrame.new(0.800003052, 0.403045654, -0.403045654, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
221 | ManualWeld5.Part0 = Part4 | |
222 | ManualWeld5.Part1 = Part21 | |
223 | Part6.Name = "boltr" | |
224 | Part6.Parent = Model1 | |
225 | Part6.Material = Enum.Material.Glass | |
226 | Part6.BrickColor = BrickColor.new("Gold") | |
227 | Part6.Rotation = Vector3.new(180, 0, 45) | |
228 | Part6.CanCollide = false | |
229 | Part6.Shape = Enum.PartType.Cylinder | |
230 | Part6.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
231 | Part6.CFrame = CFrame.new(-159.454483, 115.496948, -62.8337746, 0.707106709, -0.707106709, 6.18172393e-08, -0.707106531, -0.707106531, -6.1817218e-08, 8.74227766e-08, 0, -1) | |
232 | Part6.BottomSurface = Enum.SurfaceType.Smooth | |
233 | Part6.TopSurface = Enum.SurfaceType.Smooth | |
234 | Part6.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
235 | Part6.Position = Vector3.new(-159.454483, 115.496948, -62.8337746) | |
236 | Part6.Orientation = Vector3.new(0, 180, -135) | |
237 | Part6.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
238 | ManualWeld7.Name = "Weld" | |
239 | ManualWeld7.Parent = Part6 | |
240 | ManualWeld7.C0 = CFrame.new(0, 0, 0, 0.707106709, -0.707106709, 8.74227766e-08, -0.707106709, -0.707106709, 0, 6.18172393e-08, -6.18172393e-08, -1) | |
241 | ManualWeld7.C1 = CFrame.new(0.800003052, -0.403060913, 0.403045654, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
242 | ManualWeld7.Part0 = Part6 | |
243 | ManualWeld7.Part1 = Part21 | |
244 | Part8.Name = "boltt" | |
245 | Part8.Parent = Model1 | |
246 | Part8.Material = Enum.Material.Glass | |
247 | Part8.BrickColor = BrickColor.new("Gold") | |
248 | Part8.Rotation = Vector3.new(-180, 0, -45) | |
249 | Part8.CanCollide = false | |
250 | Part8.Shape = Enum.PartType.Cylinder | |
251 | Part8.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
252 | Part8.CFrame = CFrame.new(-160.26059, 115.496964, -62.8337746, 0.70710665, 0.707106769, 6.18172464e-08, 0.70710659, -0.707106471, 6.1817218e-08, 8.74227766e-08, 0, -0.99999994) | |
253 | Part8.BottomSurface = Enum.SurfaceType.Smooth | |
254 | Part8.TopSurface = Enum.SurfaceType.Smooth | |
255 | Part8.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
256 | Part8.Position = Vector3.new(-160.26059, 115.496964, -62.8337746) | |
257 | Part8.Orientation = Vector3.new(0, 180, 135) | |
258 | Part8.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
259 | ManualWeld9.Name = "Weld" | |
260 | ManualWeld9.Parent = Part8 | |
261 | ManualWeld9.C0 = CFrame.new(0, 0, 0, 0.70710665, 0.707106769, 8.74227695e-08, 0.707106769, -0.70710665, 0, 6.18172393e-08, 6.18172393e-08, -0.99999994) | |
262 | ManualWeld9.C1 = CFrame.new(0.800003052, -0.403045654, -0.403060913, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
263 | ManualWeld9.Part0 = Part8 | |
264 | ManualWeld9.Part1 = Part21 | |
265 | Part10.Parent = Model1 | |
266 | Part10.Material = Enum.Material.Wood | |
267 | Part10.BrickColor = BrickColor.new("CGA brown") | |
268 | Part10.Rotation = Vector3.new(-90, -45, 90) | |
269 | Part10.CanCollide = false | |
270 | Part10.Shape = Enum.PartType.Cylinder | |
271 | Part10.Size = Vector3.new(0.299999982, 1.20000005, 1.20000005) | |
272 | Part10.CFrame = CFrame.new(-159.857529, 115.899994, -62.8337746, 3.09086161e-08, -0.707106709, -0.707106709, -3.0908609e-08, -0.707106531, 0.707106531, -1, 0, -4.37113883e-08) | |
273 | Part10.BottomSurface = Enum.SurfaceType.Smooth | |
274 | Part10.TopSurface = Enum.SurfaceType.Smooth | |
275 | Part10.Color = Color3.new(0.666667, 0.333333, 0) | |
276 | Part10.Position = Vector3.new(-159.857529, 115.899994, -62.8337746) | |
277 | Part10.Orientation = Vector3.new(-45, -90, -180) | |
278 | Part10.Color = Color3.new(0.666667, 0.333333, 0) | |
279 | ManualWeld11.Name = "Weld" | |
280 | ManualWeld11.Parent = Part10 | |
281 | ManualWeld11.C0 = CFrame.new(0, 0, 0, 3.09086197e-08, -3.09086197e-08, -1, -0.707106709, -0.707106709, 0, -0.707106709, 0.707106709, -4.37113883e-08) | |
282 | ManualWeld11.C1 = CFrame.new(0.800003052, -1.52587891e-05, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
283 | ManualWeld11.Part0 = Part10 | |
284 | ManualWeld11.Part1 = Part21 | |
285 | Model12.Name = "placer" | |
286 | Model12.Parent = Model0 | |
287 | Part13.Name = "boltt" | |
288 | Part13.Parent = Model12 | |
289 | Part13.Material = Enum.Material.Glass | |
290 | Part13.BrickColor = BrickColor.new("Gold") | |
291 | Part13.Rotation = Vector3.new(180, 0, 90) | |
292 | Part13.CanCollide = false | |
293 | Part13.Shape = Enum.PartType.Cylinder | |
294 | Part13.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
295 | Part13.CFrame = CFrame.new(-159.857513, 116.470001, -62.0337715, 4.37113883e-08, -0.999999881, 3.55271368e-15, -0.999999762, -4.37113741e-08, -8.74227553e-08, 8.74227695e-08, 0, -0.99999994) | |
296 | Part13.BottomSurface = Enum.SurfaceType.Smooth | |
297 | Part13.TopSurface = Enum.SurfaceType.Smooth | |
298 | Part13.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
299 | Part13.Position = Vector3.new(-159.857513, 116.470001, -62.0337715) | |
300 | Part13.Orientation = Vector3.new(0, 180, -90) | |
301 | Part13.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
302 | ManualWeld14.Name = "Weld" | |
303 | ManualWeld14.Parent = Part13 | |
304 | ManualWeld14.C0 = CFrame.new(0, 0, 0, 4.37113883e-08, -1, 8.74227695e-08, -0.999999881, -4.37113847e-08, 0, 3.82137093e-15, -8.74227766e-08, -0.99999994) | |
305 | ManualWeld14.C1 = CFrame.new(0, 0.569992065, 1.52587891e-05, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
306 | ManualWeld14.Part0 = Part13 | |
307 | ManualWeld14.Part1 = Part21 | |
308 | Part15.Name = "boltr" | |
309 | Part15.Parent = Model12 | |
310 | Part15.Material = Enum.Material.Glass | |
311 | Part15.BrickColor = BrickColor.new("Gold") | |
312 | Part15.Rotation = Vector3.new(-180, 0, -180) | |
313 | Part15.CanCollide = false | |
314 | Part15.Shape = Enum.PartType.Cylinder | |
315 | Part15.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
316 | Part15.CFrame = CFrame.new(-160.427521, 115.900009, -62.0337715, -1, 0, -8.74227766e-08, 0, 0.999999642, 0, 8.74227766e-08, 0, -1) | |
317 | Part15.BottomSurface = Enum.SurfaceType.Smooth | |
318 | Part15.TopSurface = Enum.SurfaceType.Smooth | |
319 | Part15.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
320 | Part15.Position = Vector3.new(-160.427521, 115.900009, -62.0337715) | |
321 | Part15.Orientation = Vector3.new(0, -180, 0) | |
322 | Part15.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
323 | ManualWeld16.Name = "Weld" | |
324 | ManualWeld16.Parent = Part15 | |
325 | ManualWeld16.C0 = CFrame.new(0, 0, 0, -1, 0, 8.74227766e-08, 0, 0.999999881, 0, -8.74227766e-08, 0, -1) | |
326 | ManualWeld16.C1 = CFrame.new(0, 0, -0.569992065, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
327 | ManualWeld16.Part0 = Part15 | |
328 | ManualWeld16.Part1 = Part21 | |
329 | Part17.Name = "boltl" | |
330 | Part17.Parent = Model12 | |
331 | Part17.Material = Enum.Material.Glass | |
332 | Part17.BrickColor = BrickColor.new("Gold") | |
333 | Part17.Rotation = Vector3.new(-180, 0, -180) | |
334 | Part17.CanCollide = false | |
335 | Part17.Shape = Enum.PartType.Cylinder | |
336 | Part17.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
337 | Part17.CFrame = CFrame.new(-159.287521, 115.900009, -62.0337715, -1, 0, -8.74227766e-08, 0, 0.999999642, 0, 8.74227766e-08, 0, -1) | |
338 | Part17.BottomSurface = Enum.SurfaceType.Smooth | |
339 | Part17.TopSurface = Enum.SurfaceType.Smooth | |
340 | Part17.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
341 | Part17.Position = Vector3.new(-159.287521, 115.900009, -62.0337715) | |
342 | Part17.Orientation = Vector3.new(0, -180, 0) | |
343 | Part17.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
344 | ManualWeld18.Name = "Weld" | |
345 | ManualWeld18.Parent = Part17 | |
346 | ManualWeld18.C0 = CFrame.new(0, 0, 0, -1, 0, 8.74227766e-08, 0, 0.999999881, 0, -8.74227766e-08, 0, -1) | |
347 | ManualWeld18.C1 = CFrame.new(0, 0, 0.570007324, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
348 | ManualWeld18.Part0 = Part17 | |
349 | ManualWeld18.Part1 = Part21 | |
350 | Part19.Name = "boltb" | |
351 | Part19.Parent = Model12 | |
352 | Part19.Material = Enum.Material.Glass | |
353 | Part19.BrickColor = BrickColor.new("Gold") | |
354 | Part19.Rotation = Vector3.new(180, 0, 90) | |
355 | Part19.CanCollide = false | |
356 | Part19.Shape = Enum.PartType.Cylinder | |
357 | Part19.Size = Vector3.new(0.100000001, 0.150000006, 0.150000006) | |
358 | Part19.CFrame = CFrame.new(-159.857513, 115.330002, -62.0337715, 4.37113883e-08, -0.999999881, 3.55271368e-15, -0.999999762, -4.37113741e-08, -8.74227553e-08, 8.74227695e-08, 0, -0.99999994) | |
359 | Part19.BottomSurface = Enum.SurfaceType.Smooth | |
360 | Part19.TopSurface = Enum.SurfaceType.Smooth | |
361 | Part19.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
362 | Part19.Position = Vector3.new(-159.857513, 115.330002, -62.0337715) | |
363 | Part19.Orientation = Vector3.new(0, 180, -90) | |
364 | Part19.Color = Color3.new(0.937255, 0.721569, 0.219608) | |
365 | ManualWeld20.Name = "Weld" | |
366 | ManualWeld20.Parent = Part19 | |
367 | ManualWeld20.C0 = CFrame.new(0, 0, 0, 4.37113883e-08, -1, 8.74227695e-08, -0.999999881, -4.37113847e-08, 0, 3.82137093e-15, -8.74227766e-08, -0.99999994) | |
368 | ManualWeld20.C1 = CFrame.new(0, -0.570007324, 1.52587891e-05, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
369 | ManualWeld20.Part0 = Part19 | |
370 | ManualWeld20.Part1 = Part21 | |
371 | Part21.Parent = Model12 | |
372 | Part21.Material = Enum.Material.Wood | |
373 | Part21.BrickColor = BrickColor.new("CGA brown") | |
374 | Part21.Rotation = Vector3.new(0, 90, 0) | |
375 | Part21.CanCollide = false | |
376 | Part21.Shape = Enum.PartType.Cylinder | |
377 | Part21.Size = Vector3.new(0.299999982, 1.20000005, 1.20000005) | |
378 | Part21.CFrame = CFrame.new(-159.857529, 115.900009, -62.0337715, -4.37113883e-08, 0, 1, 0, 0.999999821, 0, -1, 0, -4.37113883e-08) | |
379 | Part21.BottomSurface = Enum.SurfaceType.Smooth | |
380 | Part21.TopSurface = Enum.SurfaceType.Smooth | |
381 | Part21.Color = Color3.new(0.666667, 0.333333, 0) | |
382 | Part21.Position = Vector3.new(-159.857529, 115.900009, -62.0337715) | |
383 | Part21.Orientation = Vector3.new(0, 90, 0) | |
384 | Part21.Color = Color3.new(0.666667, 0.333333, 0) | |
385 | ManualWeld22.Name = "Weld" | |
386 | ManualWeld22.Parent = Part21 | |
387 | ManualWeld22.C0 = CFrame.new(0, 0, 0, -4.37113883e-08, 0, -1, 0, 0.999999821, 0, 1, 0, -4.37113883e-08) | |
388 | ManualWeld22.C1 = CFrame.new(0.00436401367, -2.45159531, -1.07679749, -1, 0, 0, 0, 0, -1, 0, -1, 0) | |
389 | ManualWeld22.Part0 = Part21 | |
390 | ManualWeld22.Part1 = Part49 | |
391 | Part23.Name = "base" | |
392 | Part23.Parent = Model0 | |
393 | Part23.Material = Enum.Material.Wood | |
394 | Part23.BrickColor = BrickColor.new("Shamrock") | |
395 | Part23.Rotation = Vector3.new(0, 90, 0) | |
396 | Part23.CanCollide = false | |
397 | Part23.Shape = Enum.PartType.Cylinder | |
398 | Part23.Size = Vector3.new(2.89999986, 1, 1) | |
399 | Part23.CFrame = CFrame.new(-159.857529, 115.900009, -63.1337738, -4.37113883e-08, 0, 1, 0, 0.99999994, 0, -1, 0, -4.37113883e-08) | |
400 | Part23.BottomSurface = Enum.SurfaceType.Smooth | |
401 | Part23.TopSurface = Enum.SurfaceType.Smooth | |
402 | Part23.Color = Color3.new(0.356863, 0.603922, 0.298039) | |
403 | Part23.Position = Vector3.new(-159.857529, 115.900009, -63.1337738) | |
404 | Part23.Orientation = Vector3.new(0, 90, 0) | |
405 | Part23.Color = Color3.new(0.356863, 0.603922, 0.298039) | |
406 | ManualWeld24.Name = "Weld" | |
407 | ManualWeld24.Parent = Part23 | |
408 | ManualWeld24.C0 = CFrame.new(0, 0, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
409 | ManualWeld24.C1 = CFrame.new(1.10000229, 0, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
410 | ManualWeld24.Part0 = Part23 | |
411 | ManualWeld24.Part1 = Part21 | |
412 | Part25.Name = "cap2" | |
413 | Part25.Parent = Model0 | |
414 | Part25.Material = Enum.Material.Wood | |
415 | Part25.BrickColor = BrickColor.new("Bright green") | |
416 | Part25.Rotation = Vector3.new(0, 90, 0) | |
417 | Part25.CanCollide = false | |
418 | Part25.Shape = Enum.PartType.Cylinder | |
419 | Part25.Size = Vector3.new(0.249999985, 0.899999976, 0.899999976) | |
420 | Part25.CFrame = CFrame.new(-159.857529, 115.900002, -64.8087692, -4.37113883e-08, 0, 1, 0, 0.999999702, 0, -1, 0, -4.37113883e-08) | |
421 | Part25.BottomSurface = Enum.SurfaceType.Smooth | |
422 | Part25.TopSurface = Enum.SurfaceType.Smooth | |
423 | Part25.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
424 | Part25.Position = Vector3.new(-159.857529, 115.900002, -64.8087692) | |
425 | Part25.Orientation = Vector3.new(0, 90, 0) | |
426 | Part25.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
427 | ManualWeld26.Name = "Weld" | |
428 | ManualWeld26.Parent = Part25 | |
429 | ManualWeld26.C0 = CFrame.new(0, 0, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
430 | ManualWeld26.C1 = CFrame.new(2.77499771, -7.62939453e-06, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
431 | ManualWeld26.Part0 = Part25 | |
432 | ManualWeld26.Part1 = Part21 | |
433 | Part27.Name = "cap1" | |
434 | Part27.Parent = Model0 | |
435 | Part27.Material = Enum.Material.Wood | |
436 | Part27.BrickColor = BrickColor.new("Bright green") | |
437 | Part27.Rotation = Vector3.new(0, 90, 0) | |
438 | Part27.CanCollide = false | |
439 | Part27.Shape = Enum.PartType.Cylinder | |
440 | Part27.Size = Vector3.new(0.199999988, 1.10000002, 1.10000002) | |
441 | Part27.CFrame = CFrame.new(-159.857529, 115.900009, -64.6837692, -4.37113883e-08, 0, 1, 0, 0.999999702, 0, -1, 0, -4.37113883e-08) | |
442 | Part27.BottomSurface = Enum.SurfaceType.Smooth | |
443 | Part27.TopSurface = Enum.SurfaceType.Smooth | |
444 | Part27.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
445 | Part27.Position = Vector3.new(-159.857529, 115.900009, -64.6837692) | |
446 | Part27.Orientation = Vector3.new(0, 90, 0) | |
447 | Part27.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
448 | ManualWeld28.Name = "Weld" | |
449 | ManualWeld28.Parent = Part27 | |
450 | ManualWeld28.C0 = CFrame.new(0, 0, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
451 | ManualWeld28.C1 = CFrame.new(2.64999771, 0, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
452 | ManualWeld28.Part0 = Part27 | |
453 | ManualWeld28.Part1 = Part21 | |
454 | Part29.Name = "sightbottom" | |
455 | Part29.Parent = Model0 | |
456 | Part29.Material = Enum.Material.Wood | |
457 | Part29.BrickColor = BrickColor.new("Bright green") | |
458 | Part29.CanCollide = false | |
459 | Part29.Size = Vector3.new(0.400000036, 0.300000012, 0.150000051) | |
460 | Part29.CFrame = CFrame.new(-159.864105, 116.459465, -64.1473083, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1) | |
461 | Part29.BottomSurface = Enum.SurfaceType.Smooth | |
462 | Part29.TopSurface = Enum.SurfaceType.Smooth | |
463 | Part29.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
464 | Part29.Position = Vector3.new(-159.864105, 116.459465, -64.1473083) | |
465 | Part29.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
466 | ManualWeld30.Name = "Weld" | |
467 | ManualWeld30.Parent = Part29 | |
468 | ManualWeld30.C1 = CFrame.new(2.11353683, 0.559455872, -0.00657653809, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
469 | ManualWeld30.Part0 = Part29 | |
470 | ManualWeld30.Part1 = Part21 | |
471 | Part31.Name = "hole" | |
472 | Part31.Parent = Model0 | |
473 | Part31.Material = Enum.Material.Metal | |
474 | Part31.BrickColor = BrickColor.new("Really black") | |
475 | Part31.Rotation = Vector3.new(0, 90, 0) | |
476 | Part31.CanCollide = false | |
477 | Part31.Shape = Enum.PartType.Cylinder | |
478 | Part31.Size = Vector3.new(0.0500000007, 0.899999976, 0.899999976) | |
479 | Part31.CFrame = CFrame.new(-159.857529, 115.900009, -61.6887779, -4.37113883e-08, 0, 1, 0, 0.999999702, 0, -1, 0, -4.37113883e-08) | |
480 | Part31.BottomSurface = Enum.SurfaceType.Smooth | |
481 | Part31.TopSurface = Enum.SurfaceType.Smooth | |
482 | Part31.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
483 | Part31.Position = Vector3.new(-159.857529, 115.900009, -61.6887779) | |
484 | Part31.Orientation = Vector3.new(0, 90, 0) | |
485 | Part31.Color = Color3.new(0.0666667, 0.0666667, 0.0666667) | |
486 | ManualWeld32.Name = "Weld" | |
487 | ManualWeld32.Parent = Part31 | |
488 | ManualWeld32.C0 = CFrame.new(0, 0, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
489 | ManualWeld32.C1 = CFrame.new(-0.344993591, 0, 0, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
490 | ManualWeld32.Part0 = Part31 | |
491 | ManualWeld32.Part1 = Part21 | |
492 | Part33.Name = "handle" | |
493 | Part33.Parent = Model0 | |
494 | Part33.Material = Enum.Material.Wood | |
495 | Part33.BrickColor = BrickColor.new("CGA brown") | |
496 | Part33.Rotation = Vector3.new(15, 0, 0) | |
497 | Part33.CanCollide = false | |
498 | Part33.Size = Vector3.new(0.5, 1, 0.400000006) | |
499 | Part33.CFrame = CFrame.new(-159.866379, 115.122383, -64.3988647, 1, 0, 0, 0, 0.965925574, -0.258818954, 0, 0.258819044, 0.965925813) | |
500 | Part33.BottomSurface = Enum.SurfaceType.Smooth | |
501 | Part33.TopSurface = Enum.SurfaceType.Smooth | |
502 | Part33.Color = Color3.new(0.666667, 0.333333, 0) | |
503 | Part33.Position = Vector3.new(-159.866379, 115.122383, -64.3988647) | |
504 | Part33.Orientation = Vector3.new(15, 0, 0) | |
505 | Part33.Color = Color3.new(0.666667, 0.333333, 0) | |
506 | ManualWeld34.Name = "Weld" | |
507 | ManualWeld34.Parent = Part33 | |
508 | ManualWeld34.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.965925813, 0.258819044, 0, -0.258819044, 0.965925813) | |
509 | ManualWeld34.C1 = CFrame.new(2.36509323, -0.777626038, -0.00885009766, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
510 | ManualWeld34.Part0 = Part33 | |
511 | ManualWeld34.Part1 = Part21 | |
512 | Part35.Name = "apple1" | |
513 | Part35.Parent = Model0 | |
514 | Part35.Material = Enum.Material.SmoothPlastic | |
515 | Part35.BrickColor = BrickColor.new("Bright red") | |
516 | Part35.CanCollide = false | |
517 | Part35.Size = Vector3.new(0.100000031, 0.350000024, 0.350000054) | |
518 | Part35.CFrame = CFrame.new(-160.314087, 115.88446, -63.6473083, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1) | |
519 | Part35.BottomSurface = Enum.SurfaceType.Smooth | |
520 | Part35.TopSurface = Enum.SurfaceType.Smooth | |
521 | Part35.Color = Color3.new(0.768628, 0.156863, 0.109804) | |
522 | Part35.Position = Vector3.new(-160.314087, 115.88446, -63.6473083) | |
523 | Part35.Color = Color3.new(0.768628, 0.156863, 0.109804) | |
524 | ManualWeld36.Name = "Weld" | |
525 | ManualWeld36.Parent = Part35 | |
526 | ManualWeld36.C1 = CFrame.new(1.61353683, -0.0155487061, -0.456558228, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
527 | ManualWeld36.Part0 = Part35 | |
528 | ManualWeld36.Part1 = Part21 | |
529 | Part37.Name = "apple2" | |
530 | Part37.Parent = Model0 | |
531 | Part37.Material = Enum.Material.SmoothPlastic | |
532 | Part37.BrickColor = BrickColor.new("Camo") | |
533 | Part37.CanCollide = false | |
534 | Part37.Size = Vector3.new(0.100000031, 0.150000006, 0.0500000417) | |
535 | Part37.CFrame = CFrame.new(-160.314087, 116.13446, -63.6473122, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1) | |
536 | Part37.BottomSurface = Enum.SurfaceType.Smooth | |
537 | Part37.TopSurface = Enum.SurfaceType.Smooth | |
538 | Part37.Color = Color3.new(0.227451, 0.490196, 0.0823529) | |
539 | Part37.Position = Vector3.new(-160.314087, 116.13446, -63.6473122) | |
540 | Part37.Color = Color3.new(0.227451, 0.490196, 0.0823529) | |
541 | ManualWeld38.Name = "Weld" | |
542 | ManualWeld38.Parent = Part37 | |
543 | ManualWeld38.C1 = CFrame.new(1.61354065, 0.234451294, -0.456558228, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
544 | ManualWeld38.Part0 = Part37 | |
545 | ManualWeld38.Part1 = Part21 | |
546 | Part39.Name = "apple3" | |
547 | Part39.Parent = Model0 | |
548 | Part39.Material = Enum.Material.SmoothPlastic | |
549 | Part39.BrickColor = BrickColor.new("Camo") | |
550 | Part39.CanCollide = false | |
551 | Part39.Size = Vector3.new(0.100000031, 0.100000009, 0.150000036) | |
552 | Part39.CFrame = CFrame.new(-160.314087, 116.159462, -63.7473106, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1) | |
553 | Part39.BottomSurface = Enum.SurfaceType.Smooth | |
554 | Part39.TopSurface = Enum.SurfaceType.Smooth | |
555 | Part39.Color = Color3.new(0.227451, 0.490196, 0.0823529) | |
556 | Part39.Position = Vector3.new(-160.314087, 116.159462, -63.7473106) | |
557 | Part39.Color = Color3.new(0.227451, 0.490196, 0.0823529) | |
558 | ManualWeld40.Name = "Weld" | |
559 | ManualWeld40.Parent = Part39 | |
560 | ManualWeld40.C1 = CFrame.new(1.71353912, 0.25945282, -0.456558228, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
561 | ManualWeld40.Part0 = Part39 | |
562 | ManualWeld40.Part1 = Part21 | |
563 | Part41.Name = "sighttop" | |
564 | Part41.Parent = Model0 | |
565 | Part41.Material = Enum.Material.Wood | |
566 | Part41.BrickColor = BrickColor.new("Bright green") | |
567 | Part41.CanCollide = false | |
568 | Part41.Size = Vector3.new(0.200000048, 0.099999994, 0.150000051) | |
569 | Part41.CFrame = CFrame.new(-159.864105, 116.65947, -64.1473083, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1) | |
570 | Part41.BottomSurface = Enum.SurfaceType.Smooth | |
571 | Part41.TopSurface = Enum.SurfaceType.Smooth | |
572 | Part41.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
573 | Part41.Position = Vector3.new(-159.864105, 116.65947, -64.1473083) | |
574 | Part41.Color = Color3.new(0.294118, 0.592157, 0.294118) | |
575 | ManualWeld42.Name = "Weld" | |
576 | ManualWeld42.Parent = Part41 | |
577 | ManualWeld42.C1 = CFrame.new(2.11353683, 0.759460449, -0.00657653809, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
578 | ManualWeld42.Part0 = Part41 | |
579 | ManualWeld42.Part1 = Part21 | |
580 | Part43.Name = "fingerbottom" | |
581 | Part43.Parent = Model0 | |
582 | Part43.Material = Enum.Material.Wood | |
583 | Part43.BrickColor = BrickColor.new("CGA brown") | |
584 | Part43.CanCollide = false | |
585 | Part43.Size = Vector3.new(0.200000048, 0.099999994, 0.400000066) | |
586 | Part43.CFrame = CFrame.new(-159.864105, 115.15947, -64.0223083, 1, 0, 0, 0, 0.999999762, 0, 0, 0, 1) | |
587 | Part43.BottomSurface = Enum.SurfaceType.Smooth | |
588 | Part43.TopSurface = Enum.SurfaceType.Smooth | |
589 | Part43.Color = Color3.new(0.666667, 0.333333, 0) | |
590 | Part43.Position = Vector3.new(-159.864105, 115.15947, -64.0223083) | |
591 | Part43.Color = Color3.new(0.666667, 0.333333, 0) | |
592 | ManualWeld44.Name = "Weld" | |
593 | ManualWeld44.Parent = Part43 | |
594 | ManualWeld44.C1 = CFrame.new(1.98853683, -0.740539551, -0.00657653809, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
595 | ManualWeld44.Part0 = Part43 | |
596 | ManualWeld44.Part1 = Part21 | |
597 | Part45.Name = "fingertop" | |
598 | Part45.Parent = Model0 | |
599 | Part45.Material = Enum.Material.Wood | |
600 | Part45.BrickColor = BrickColor.new("CGA brown") | |
601 | Part45.Rotation = Vector3.new(-90, 0, 0) | |
602 | Part45.CanCollide = false | |
603 | Part45.Size = Vector3.new(0.200000048, 0.099999994, 0.400000066) | |
604 | Part45.CFrame = CFrame.new(-159.864105, 115.309471, -63.7723045, 1, 0, 0, 0, 1.1924878e-08, 0.999999762, 0, -1, 1.19248806e-08) | |
605 | Part45.BottomSurface = Enum.SurfaceType.Smooth | |
606 | Part45.TopSurface = Enum.SurfaceType.Smooth | |
607 | Part45.Color = Color3.new(0.666667, 0.333333, 0) | |
608 | Part45.Position = Vector3.new(-159.864105, 115.309471, -63.7723045) | |
609 | Part45.Orientation = Vector3.new(-89.9599991, 0, 0) | |
610 | Part45.Color = Color3.new(0.666667, 0.333333, 0) | |
611 | ManualWeld46.Name = "Weld" | |
612 | ManualWeld46.Parent = Part45 | |
613 | ManualWeld46.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1.19248806e-08, -1, 0, 1, 1.19248806e-08) | |
614 | ManualWeld46.C1 = CFrame.new(1.73853302, -0.590538025, -0.00657653809, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
615 | ManualWeld46.Part0 = Part45 | |
616 | ManualWeld46.Part1 = Part21 | |
617 | Part47.Name = "trigger" | |
618 | Part47.Parent = Model0 | |
619 | Part47.Material = Enum.Material.Wood | |
620 | Part47.BrickColor = BrickColor.new("CGA brown") | |
621 | Part47.Rotation = Vector3.new(-90, 0, 0) | |
622 | Part47.CanCollide = false | |
623 | Part47.Size = Vector3.new(0.100000046, 0.099999994, 0.25000006) | |
624 | Part47.CFrame = CFrame.new(-159.864105, 115.384476, -64.0223083, 1, 0, 0, 0, 1.1924878e-08, 0.999999762, 0, -1, 1.19248806e-08) | |
625 | Part47.BottomSurface = Enum.SurfaceType.Smooth | |
626 | Part47.TopSurface = Enum.SurfaceType.Smooth | |
627 | Part47.Color = Color3.new(0.666667, 0.333333, 0) | |
628 | Part47.Position = Vector3.new(-159.864105, 115.384476, -64.0223083) | |
629 | Part47.Orientation = Vector3.new(-89.9599991, 0, 0) | |
630 | Part47.Color = Color3.new(0.666667, 0.333333, 0) | |
631 | ManualWeld48.Name = "Weld" | |
632 | ManualWeld48.Parent = Part47 | |
633 | ManualWeld48.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1.19248806e-08, -1, 0, 1, 1.19248806e-08) | |
634 | ManualWeld48.C1 = CFrame.new(1.98853683, -0.515533447, -0.00657653809, -4.37113883e-08, 0, -1, 0, 0.99999994, 0, 1, 0, -4.37113883e-08) | |
635 | ManualWeld48.Part0 = Part47 | |
636 | ManualWeld48.Part1 = Part21 | |
637 | Part49.Name = "MAIN" | |
638 | Part49.Parent = Model0 | |
639 | Part49.Transparency = 1 | |
640 | Part49.Rotation = Vector3.new(90, 0, -180) | |
641 | Part49.CanCollide = false | |
642 | Part49.Size = Vector3.new(1, 1, 1) | |
643 | Part49.CFrame = CFrame.new(-159.853165, 114.823212, -64.4853668, -1, 0, 0, 0, 0, -0.999999642, 0, -1, 0) | |
644 | Part49.BottomSurface = Enum.SurfaceType.Smooth | |
645 | Part49.TopSurface = Enum.SurfaceType.Smooth | |
646 | Part49.Position = Vector3.new(-159.853165, 114.823212, -64.4853668) | |
647 | Part49.Orientation = Vector3.new(89.9499969, 0, 0) | |
648 | for i,v in pairs(mas:GetChildren()) do | |
649 | v.Parent = char | |
650 | main = Part49 | |
651 | hole = Part31 | |
652 | colorp = Part35 | |
653 | pcall(function() v:MakeJoints() end) | |
654 | end | |
655 | mas:Destroy() | |
656 | for i,v in pairs(cors) do | |
657 | spawn(function() | |
658 | pcall(v) | |
659 | end) | |
660 | end | |
661 | ||
662 | local ws = hum.WalkSpeed | |
663 | local jp = hum.JumpPower | |
664 | local nws = ws | |
665 | local njp = jp | |
666 | ||
667 | local rootj0 = rootj.C0 | |
668 | local neck0 = neck.C0 | |
669 | local LS0 = LS.C0 | |
670 | local RS0 = RS.C0 | |
671 | local LH0 = LH.C0 | |
672 | local RH0 = RH.C0 | |
673 | local rootj1 = rootj.C1 | |
674 | local neck1 = neck.C1 | |
675 | local LS1 = LS.C1 | |
676 | local RS1 = RS.C1 | |
677 | local LH1 = LH.C1 | |
678 | local RH1 = RH.C1 | |
679 | ||
680 | local thunk = Instance.new("Sound", hole) | |
681 | thunk.SoundId = "rbxassetid://2082516881" | |
682 | thunk.Volume = 2 | |
683 | thunk.Name = "THUNK" | |
684 | ||
685 | local klick = Instance.new("Sound", colorp) | |
686 | klick.SoundId = "rbxassetid://2082543019" | |
687 | klick.Volume = 2 | |
688 | klick.Name = "KLICK" | |
689 | ||
690 | ----------------------------------------------------------------------------- | |
691 | ||
692 | local CFn = CFrame.new | |
693 | local CFa = CFrame.Angles | |
694 | local Rad = math.rad | |
695 | local Cos = math.cos | |
696 | local Sin = math.sin | |
697 | local sine = 1 | |
698 | local attacking = false | |
699 | local Shooting = false | |
700 | local Changing = false | |
701 | ||
702 | ----------------------------------------------------------------------------- | |
703 | ||
704 | local foodtype = "Apple" | |
705 | ||
706 | ----------------------------------------------------------------------------- | |
707 | ||
708 | local tw = Instance.new("Weld", main) | |
709 | tw.Part0 = rarm | |
710 | tw.Part1 = main | |
711 | tw.C1 = CFn(0, 0.5, 0) | |
712 | local tw1 = tw.C1 | |
713 | local tw0 = tw.C0 | |
714 | ||
715 | ----------------------------------------------------------------------------- | |
716 | ||
717 | ArtificialHB = Instance.new("BindableEvent", script) | |
718 | ArtificialHB.Name = "Heartbeat" | |
719 | script:WaitForChild("Heartbeat") | |
720 | ||
721 | frame = 1 / 60 | |
722 | tf = 0 | |
723 | allowframeloss = false | |
724 | tossremainder = false | |
725 | ||
726 | ||
727 | lastframe = tick() | |
728 | script.Heartbeat:Fire() | |
729 | ||
730 | ||
731 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
732 | tf = tf + s | |
733 | if tf >= frame then | |
734 | if allowframeloss then | |
735 | script.Heartbeat:Fire() | |
736 | lastframe = tick() | |
737 | else | |
738 | for i = 1, math.floor(tf / frame) do | |
739 | script.Heartbeat:Fire() | |
740 | end | |
741 | lastframe = tick() | |
742 | end | |
743 | if tossremainder then | |
744 | tf = 0 | |
745 | else | |
746 | tf = tf - frame * math.floor(tf / frame) | |
747 | end | |
748 | end | |
749 | end) | |
750 | ||
751 | function swait(num) | |
752 | if num == 0 or num == nil then | |
753 | game:service("RunService").Stepped:wait(0) | |
754 | else | |
755 | for i = 0, num do | |
756 | game:service("RunService").Stepped:wait(0) | |
757 | end | |
758 | end | |
759 | end | |
760 | ||
761 | function clerp(a, b, t) | |
762 | return a:lerp(b, t) | |
763 | end | |
764 | ||
765 | function Sound(id, vol, par, name) | |
766 | if not par:FindFirstChild(name) then | |
767 | local sound = Instance.new("Sound", par) | |
768 | sound.SoundId = id | |
769 | sound.Volume = vol | |
770 | sound.Name = name | |
771 | sound:Play() | |
772 | return sound | |
773 | else | |
774 | local sound = par:FindFirstChild(name) | |
775 | sound:Play() | |
776 | return sound | |
777 | end | |
778 | end | |
779 | ||
780 | ||
781 | ||
782 | function Shoot() | |
783 | if attacking == false and Shooting == false then | |
784 | attacking = true | |
785 | Shooting = true | |
786 | root.CFrame = CFn(root.CFrame.p, Vector3.new(Mouse.Hit.x, root.CFrame.y, Mouse.Hit.z)) | |
787 | hum.WalkSpeed = 5 | |
788 | hum.JumpPower = 2 | |
789 | for i = 0,1,.2 do | |
790 | tw.C0 = clerp(tw.C0, tw0, i) | |
791 | tw.C1 = clerp(tw.C1, tw1, i) | |
792 | neck.C1 = clerp(neck.C1, neck1 * CFa(0, 0, Rad(60)), i) | |
793 | rootj.C1 = clerp(rootj.C1, rootj1 * CFa(0, 0, Rad(-50)), i) | |
794 | LS.C1 = clerp(LS.C1, LS1 * CFa(0, 0, Rad(30)), i) | |
795 | RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(50), 0, 0), i) | |
796 | LH.C1 = clerp(LH.C1, LH1 * CFa(Rad(5), 0, 0), i) | |
797 | RH.C1 = clerp(RH.C1, RH1 * CFa(Rad(5), Rad(50), 0), i) | |
798 | neck.C0 = clerp(neck.C0, neck0 * CFa(Rad(5), 0, 0), i) | |
799 | rootj.C0 = clerp(rootj.C0, rootj0, i) | |
800 | LS.C0 = clerp(LS.C0, LS0, i) | |
801 | RS.C0 = clerp(RS.C0, RS0 * CFa(0, 0, Rad(90)), i) | |
802 | LH.C0 = clerp(LH.C0, LH0, i) | |
803 | RH.C0 = clerp(RH.C0, RH0, i) | |
804 | swait() | |
805 | end | |
806 | Sound("rbxassetid://2082516881", 2, hole, "THUNK") | |
807 | - | local bul = Instance.new("Part", char) |
807 | + | local bul = Instance.new("MeshPart", char) |
808 | bul.Size = Vector3.new(1, 1, 1) | |
809 | bul.CFrame = hole.CFrame | |
810 | - | local bulm = Instance.new("SpecialMesh", bul) |
810 | + | |
811 | - | bulm.MeshType = "FileMesh" |
811 | + | |
812 | owtype = "Apple" | |
813 | bul.Name = "APPLE" | |
814 | bul.MeshId = "rbxassetid://545442495" | |
815 | bul.TextureId = "rbxassetid://545442518" | |
816 | - | bulm.MeshId = "rbxassetid://923453681" |
816 | + | bul.Scale = Vector3.new(1, 1, 1) |
817 | - | bulm.TextureId = "rbxassetid://923453682" |
817 | + | |
818 | - | bulm.Scale = Vector3.new(0.02, 0.02, 0.02) |
818 | + | |
819 | bul.Name = "GRAPE" | |
820 | bul.MeshId = "rbxassetid://16940906" | |
821 | bul.TextureId = "rbxassetid://16940893" | |
822 | - | bulm.MeshId = "rbxassetid://16940906" |
822 | + | bul.Scale = Vector3.new(0.7, 0.7, 0.7) |
823 | - | bulm.TextureId = "rbxassetid://16940893" |
823 | + | |
824 | - | bulm.Scale = Vector3.new(0.7, 0.7, 0.7) |
824 | + | |
825 | bul.Name = "LEMON" | |
826 | bul.MeshId = "rbxassetid://431017393" | |
827 | bul.TextureId = "rbxassetid://431017394" | |
828 | - | bulm.MeshId = "rbxassetid://431017393" |
828 | + | bul.Scale = Vector3.new(0.003, 0.003, 0.003) |
829 | - | bulm.TextureId = "rbxassetid://431017394" |
829 | + | |
830 | - | bulm.Scale = Vector3.new(0.003, 0.003, 0.003) |
830 | + | |
831 | bul.Name = "MELON" | |
832 | bul.MeshId = "rbxassetid://110218693" | |
833 | bul.TextureId = "rbxassetid://110218767" | |
834 | - | bulm.MeshId = "rbxassetid://110218693" |
834 | + | bul.Scale = Vector3.new(0.6, 0.6, 0.6) |
835 | - | bulm.TextureId = "rbxassetid://110218767" |
835 | + | |
836 | - | bulm.Scale = Vector3.new(0.6, 0.6, 0.6) |
836 | + | |
837 | bul.Velocity = dis * 200 + Vector3.new(0, 6, 0) | |
838 | local bulBF = Instance.new("BodyForce", bul) | |
839 | bulBF.Force = Vector3.new(0, bul:GetMass() * 140, 0) | |
840 | game:GetService("Debris"):AddItem(bul, 20) | |
841 | bul.Touched:connect(function(hit) | |
842 | if not hit:IsDescendantOf(char) and hit.Parent:FindFirstChildOfClass("Humanoid") and bul.Name ~= "BONKAIYA" then | |
843 | bul.Name = "BONKAIYA" | |
844 | local theman = hit.Parent | |
845 | local thetor = theman:FindFirstChild("Torso") or theman:FindFirstChild("UpperTorso") | |
846 | local thehead = theman:FindFirstChild("Head") | |
847 | local thehum = theman:FindFirstChildOfClass("Humanoid") | |
848 | Sound("rbxassetid://180083298", 2, hit, "SPLAT") | |
849 | if owtype == "Apple" then | |
850 | thehum.Health = thehum.Health - 40 | |
851 | bul:Destroy() | |
852 | elseif owtype == "Grape" then | |
853 | thehum.Health = thehum.Health - 1 | |
854 | bul:Destroy() | |
855 | coroutine.resume(coroutine.create(function() | |
856 | for i = 1,5 do | |
857 | thehum.Jump = true | |
858 | thetor.CFrame = thetor.CFrame * CFa(Rad(math.random(-360, 360)), Rad(math.random(-360, 360)), Rad(math.random(-360, 360))) | |
859 | wait(0.2) | |
860 | end | |
861 | end)) | |
862 | elseif owtype == "Lemon" then | |
863 | local newhead = Instance.new("Part", theman) | |
864 | newhead.Size = Vector3.new(2, 2, 2) | |
865 | newhead.CanCollide = false | |
866 | local themesh = Instance.new("SpecialMesh", newhead) | |
867 | themesh.Scale = Vector3.new(0.015, 0.015, 0.015) | |
868 | themesh.MeshType = "FileMesh" | |
869 | themesh.MeshId = "rbxassetid://431017393" | |
870 | themesh.TextureId = "rbxassetid://431017394" | |
871 | local nhw = Instance.new("Weld", newhead) | |
872 | nhw.Part0 = thehead | |
873 | nhw.Part1 = newhead | |
874 | game:GetService("Debris"):AddItem(newhead, 20) | |
875 | bul:Destroy() | |
876 | coroutine.resume(coroutine.create(function() | |
877 | for i = 1,10 do | |
878 | thehum.Health = thehum.Health - 2 | |
879 | wait(0.3) | |
880 | end | |
881 | end)) | |
882 | elseif owtype == "Melon" then | |
883 | for i = 1,10 do | |
884 | local newm = Instance.new("Part", workspace) | |
885 | newm.Size = Vector3.new(1, 1, 1) | |
886 | newm.Name = "melonio" | |
887 | local newmm = Instance.new("SpecialMesh", newm) | |
888 | newmm.MeshId = "rbxassetid://22770654" | |
889 | newmm.TextureId = "rbxassetid://22770653" | |
890 | newmm.Scale = Vector3.new(0.6, 0.6, 0.6) | |
891 | newm.CFrame = bul.CFrame * CFn(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)) | |
892 | game:GetService("Debris"):AddItem(newm, 7) | |
893 | end | |
894 | bul:Destroy() | |
895 | coroutine.resume(coroutine.create(function() | |
896 | for i = 1,10 do | |
897 | thehum.Health = thehum.Health - 2.5 | |
898 | wait(0.2) | |
899 | end | |
900 | end)) | |
901 | end | |
902 | local ep = Instance.new("Part", hit) | |
903 | ep.Anchored = true | |
904 | ep.CanCollide = false | |
905 | ep.Size = Vector3.new(1, 1, 1) | |
906 | ep.Transparency = 1 | |
907 | ep.CFrame = bul.CFrame | |
908 | local fruitsplash = Instance.new("ParticleEmitter", hit) | |
909 | fruitsplash.LightEmission = 0.7 | |
910 | fruitsplash.Lifetime = NumberRange.new(0.4) | |
911 | fruitsplash.Speed = NumberRange.new(9) | |
912 | fruitsplash.SpreadAngle = Vector2.new(-360, 360) | |
913 | fruitsplash.Rate = 200 | |
914 | fruitsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 2.56), NumberSequenceKeypoint.new(1, 0)}) | |
915 | fruitsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1)}) | |
916 | if owtype == "Apple" then | |
917 | fruitsplash.Texture = "rbxassetid://771221224" | |
918 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 0))}) | |
919 | elseif owtype == "Grape" then | |
920 | fruitsplash.Texture = "rbxassetid://2082378208" | |
921 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(170, 0, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(170, 0, 255))}) | |
922 | elseif owtype == "Lemon" then | |
923 | fruitsplash.Texture = "rbxassetid://2082448160" | |
924 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 0))}) | |
925 | elseif owtype == "Melon" then | |
926 | fruitsplash.Texture = "rbxassetid://2082448160" | |
927 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 170, 0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 170, 0))}) | |
928 | end | |
929 | wait(0.5) | |
930 | fruitsplash.Enabled = false | |
931 | ep:Destroy() | |
932 | elseif not hit:IsDescendantOf(char) and hit.Parent.Parent:FindFirstChildOfClass("Humanoid") and bul.Name ~= "BONKAIYA" then | |
933 | bul.Name = "BONKAIYA" | |
934 | local theman = hit.Parent.Parent | |
935 | local thetor = theman:FindFirstChild("Torso") or theman:FindFirstChild("UpperTorso") | |
936 | local thehead = theman:FindFirstChild("Head") | |
937 | local thehum = theman:FindFirstChildOfClass("Humanoid") | |
938 | Sound("rbxassetid://180083298", 2, hit, "SPLAT") | |
939 | if owtype == "Apple" then | |
940 | thehum.Health = thehum.Health - 40 | |
941 | bul:Destroy() | |
942 | elseif owtype == "Grape" then | |
943 | thehum.Health = thehum.Health - 15 | |
944 | bul:Destroy() | |
945 | coroutine.resume(coroutine.create(function() | |
946 | for i = 1,5 do | |
947 | thehum.Jump = true | |
948 | thetor.CFrame = thetor.CFrame * CFa(Rad(math.random(-360, 360)), Rad(math.random(-360, 360)), Rad(math.random(-360, 360))) | |
949 | wait(0.2) | |
950 | end | |
951 | end)) | |
952 | elseif owtype == "Lemon" then | |
953 | local newhead = Instance.new("Part", theman) | |
954 | newhead.Size = Vector3.new(1, 1, 1) | |
955 | newhead.CanCollide = false | |
956 | local themesh = Instance.new("SpecialMesh", newhead) | |
957 | themesh.Scale = Vector3.new(0.015, 0.015, 0.015) | |
958 | themesh.MeshType = "FileMesh" | |
959 | themesh.MeshId = "rbxassetid://431017393" | |
960 | themesh.TextureId = "rbxassetid://431017394" | |
961 | local nhw = Instance.new("Weld", newhead) | |
962 | nhw.Part0 = thehead | |
963 | nhw.Part1 = newhead | |
964 | game:GetService("Debris"):AddItem(newhead, 20) | |
965 | bul:Destroy() | |
966 | coroutine.resume(coroutine.create(function() | |
967 | for i = 1,10 do | |
968 | thehum.Health = thehum.Health - 2 | |
969 | wait(0.3) | |
970 | end | |
971 | end)) | |
972 | elseif owtype == "Melon" then | |
973 | for i = 1,10 do | |
974 | local newm = Instance.new("Part", workspace) | |
975 | newm.Size = Vector3.new(1, 1, 1) | |
976 | newm.Name = "melonio" | |
977 | local newmm = Instance.new("SpecialMesh", newm) | |
978 | newmm.MeshId = "rbxassetid://22770654" | |
979 | newmm.TextureId = "rbxassetid://22770653" | |
980 | newmm.Scale = Vector3.new(0.6, 0.6, 0.6) | |
981 | newm.CFrame = bul.CFrame * CFn(math.random(-1, 1), math.random(-1, 1), math.random(-1, 1)) | |
982 | game:GetService("Debris"):AddItem(newm, 7) | |
983 | end | |
984 | bul:Destroy() | |
985 | coroutine.resume(coroutine.create(function() | |
986 | for i = 1,10 do | |
987 | thehum.Health = thehum.Health - 2.5 | |
988 | wait(0.2) | |
989 | end | |
990 | end)) | |
991 | end | |
992 | local ep = Instance.new("Part", hit) | |
993 | ep.Anchored = true | |
994 | ep.CanCollide = false | |
995 | ep.Size = Vector3.new(1, 1, 1) | |
996 | ep.Transparency = 1 | |
997 | ep.CFrame = bul.CFrame | |
998 | local fruitsplash = Instance.new("ParticleEmitter", hit) | |
999 | fruitsplash.LightEmission = 0.7 | |
1000 | fruitsplash.Lifetime = NumberRange.new(0.4) | |
1001 | fruitsplash.Speed = NumberRange.new(9) | |
1002 | fruitsplash.SpreadAngle = Vector2.new(-360, 360) | |
1003 | fruitsplash.Rate = 200 | |
1004 | fruitsplash.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 2.56), NumberSequenceKeypoint.new(1, 0)}) | |
1005 | fruitsplash.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1)}) | |
1006 | if owtype == "Apple" then | |
1007 | fruitsplash.Texture = "rbxassetid://771221224" | |
1008 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 0))}) | |
1009 | elseif owtype == "Grape" then | |
1010 | fruitsplash.Texture = "rbxassetid://2082378208" | |
1011 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(170, 0, 255)), ColorSequenceKeypoint.new(1, Color3.fromRGB(170, 0, 255))}) | |
1012 | elseif owtype == "Lemon" then | |
1013 | fruitsplash.Texture = "rbxassetid://2082448160" | |
1014 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 255, 0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 255, 0))}) | |
1015 | elseif owtype == "Melon" then | |
1016 | fruitsplash.Texture = "rbxassetid://2082448160" | |
1017 | fruitsplash.Color = ColorSequence.new({ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 170, 0)), ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 170, 0))}) | |
1018 | end | |
1019 | wait(0.5) | |
1020 | fruitsplash.Enabled = false | |
1021 | ep:Destroy() | |
1022 | end | |
1023 | end) | |
1024 | for i = 0,1,.2 do | |
1025 | tw.C0 = clerp(tw.C0, tw0, i) | |
1026 | tw.C1 = clerp(tw.C1, tw1, i) | |
1027 | neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(10), 0, Rad(60)), i) | |
1028 | rootj.C1 = clerp(rootj.C1, rootj1 * CFa(0, 0, Rad(-50)), i) | |
1029 | LS.C1 = clerp(LS.C1, LS1 * CFa(0, 0, Rad(30)), i) | |
1030 | RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(50), 0, 0), i) | |
1031 | LH.C1 = clerp(LH.C1, LH1 * CFa(Rad(5), 0, 0), i) | |
1032 | RH.C1 = clerp(RH.C1, RH1 * CFa(Rad(5), Rad(50), 0), i) | |
1033 | neck.C0 = clerp(neck.C0, neck0 * CFa(Rad(5), 0, 0), i) | |
1034 | rootj.C0 = clerp(rootj.C0, rootj0, i) | |
1035 | LS.C0 = clerp(LS.C0, LS0, i) | |
1036 | RS.C0 = clerp(RS.C0, RS0 * CFa(Rad(-90), 0, Rad(90)), i) | |
1037 | LH.C0 = clerp(LH.C0, LH0, i) | |
1038 | RH.C0 = clerp(RH.C0, RH0, i) | |
1039 | swait() | |
1040 | end | |
1041 | hum.WalkSpeed = nws | |
1042 | hum.JumpPower = njp | |
1043 | Shooting = false | |
1044 | attacking = false | |
1045 | end | |
1046 | end | |
1047 | ||
1048 | function ChangeFruit() | |
1049 | if attacking == false and Changing == false then | |
1050 | attacking = true | |
1051 | Changing = true | |
1052 | Sound("rbxassetid://2082543019", 2, colorp, "KLICK") | |
1053 | if foodtype == "Apple" then | |
1054 | foodtype = "Grape" | |
1055 | colorp.BrickColor = BrickColor.new("Eggplant") | |
1056 | elseif foodtype == "Grape" then | |
1057 | foodtype = "Lemon" | |
1058 | colorp.BrickColor = BrickColor.new("New Yeller") | |
1059 | elseif foodtype == "Lemon" then | |
1060 | foodtype = "Melon" | |
1061 | colorp.BrickColor = BrickColor.new("Bright green") | |
1062 | elseif foodtype == "Melon" then | |
1063 | foodtype = "Apple" | |
1064 | colorp.BrickColor = BrickColor.new("Bright red") | |
1065 | end | |
1066 | Changing = false | |
1067 | attacking = false | |
1068 | end | |
1069 | end | |
1070 | ||
1071 | ----------------------------------------------------------------------------- | |
1072 | ||
1073 | function kdown(k) | |
1074 | if k == "e" then | |
1075 | ChangeFruit() | |
1076 | end | |
1077 | end | |
1078 | ||
1079 | function lmdown() | |
1080 | Shoot() | |
1081 | end | |
1082 | ||
1083 | Mouse.KeyDown:connect(kdown) | |
1084 | Mouse.Button1Down:connect(lmdown) | |
1085 | ||
1086 | ----------------------------------------------------------------------------- | |
1087 | ||
1088 | warn([[Fruit Launcher. | |
1089 | last updated: 2018/7/25, 14:16 JST. | |
1090 | ||
1091 | ]]) | |
1092 | ||
1093 | ----------------------------------------------------------------------------- | |
1094 | ||
1095 | while true do | |
1096 | swait() | |
1097 | sine = sine + 1 | |
1098 | local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1099 | if Shooting == true then | |
1100 | state = "Shoot" | |
1101 | elseif Changing == true then | |
1102 | state = "Change" | |
1103 | elseif 1 < root.Velocity.y then | |
1104 | state = "Jump" | |
1105 | elseif -1 > root.Velocity.y then | |
1106 | state = "Fall" | |
1107 | elseif torvel < 1 then | |
1108 | state = "Idle" | |
1109 | elseif tor.Velocity.magnitude < 50 then | |
1110 | state = "Walk" | |
1111 | end | |
1112 | ||
1113 | if state == "Jump" then | |
1114 | tw.C0 = clerp(tw.C0, tw0, 0.15) | |
1115 | tw.C1 = clerp(tw.C1, tw1, 0.15) | |
1116 | neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-20), 0, 0), 0.15) | |
1117 | rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(-10), 0, 0), 0.15) | |
1118 | LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(40), 0, 0), 0.15) | |
1119 | RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(40), 0, 0), 0.15) | |
1120 | LH.C1 = clerp(LH.C1, LH1 * CFn(0.7, -1.3, -0.2) * CFa(Rad(-10), 0, Rad(-60)), 0.15) | |
1121 | RH.C1 = clerp(RH.C1, RH1 * CFn(-0.5, -1.1, 0) * CFa(Rad(-5), 0, Rad(35)), 0.15) | |
1122 | neck.C0 = clerp(neck.C0, neck0, 0.15) | |
1123 | rootj.C0 = clerp(rootj.C0, rootj0, 0.15) | |
1124 | LS.C0 = clerp(LS.C0, LS0, 0.15) | |
1125 | RS.C0 = clerp(RS.C0, RS0, 0.15) | |
1126 | LH.C0 = clerp(LH.C0, LH0, 0.15) | |
1127 | RH.C0 = clerp(RH.C0, RH0, 0.15) | |
1128 | elseif state == "Fall" then | |
1129 | tw.C0 = clerp(tw.C0, tw0, 0.15) | |
1130 | tw.C1 = clerp(tw.C1, tw1, 0.15) | |
1131 | neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-5), 0, 0), 0.15) | |
1132 | rootj.C1 = clerp(rootj.C1, rootj1 * CFa(Rad(10), 0, 0), 0.15) | |
1133 | LS.C1 = clerp(LS.C1, LS1 * CFa(Rad(20), 0, 0), 0.15) | |
1134 | RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(20), 0, 0), 0.15) | |
1135 | LH.C1 = clerp(LH.C1, LH1 * CFn(0.4, -0.7, -0.1) * CFa(Rad(-2), 0, 0), 0.15) | |
1136 | RH.C1 = clerp(RH.C1, RH1 * CFn(-0.4, -0.7, -0.1) * CFa(Rad(-2), 0, 0), 0.15) | |
1137 | neck.C0 = clerp(neck.C0, neck0, 0.15) | |
1138 | rootj.C0 = clerp(rootj.C0, rootj0, 0.15) | |
1139 | LS.C0 = clerp(LS.C0, LS0, 0.15) | |
1140 | RS.C0 = clerp(RS.C0, RS0, 0.15) | |
1141 | LH.C0 = clerp(LH.C0, LH0 * CFa(0, 0, Rad(20)), 0.15) | |
1142 | RH.C0 = clerp(RH.C0, RH0 * CFa(0, 0, Rad(-20)), 0.15) | |
1143 | elseif state == "Idle" then | |
1144 | tw.C0 = clerp(tw.C0, tw0, 0.15) | |
1145 | tw.C1 = clerp(tw.C1, tw1, 0.15) | |
1146 | neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(7 * Sin(sine / 15)), 0, 0), 0.15) | |
1147 | rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.1 * Cos(sine / 15)) * CFa(Rad(-2 * Sin(sine / 15)), 0, 0), 0.15) | |
1148 | LS.C1 = clerp(LS.C1, LS1 * CFn(0, 0.1 * Cos(sine / 15), 0) * CFa(0, 0, Rad(30)), 0.15) | |
1149 | RS.C1 = clerp(RS.C1, RS1 * CFn(0, 0, 0.1 * Cos(sine / 15)) * CFa(Rad(-70), Rad(-50), Rad(-90)), 0.15) | |
1150 | LH.C1 = clerp(LH.C1, LH1 * CFn(0, -0.1 * Cos(sine / 15), 0) * CFa(Rad(5), 0, Rad(2 * Sin(sine / 15))), 0.15) | |
1151 | RH.C1 = clerp(RH.C1, RH1 * CFn(0, -0.1 * Cos(sine / 15), 0) * CFa(Rad(5), 0, Rad(-2 * Sin(sine / 15))), 0.15) | |
1152 | neck.C0 = clerp(neck.C0, neck0 * CFa(Rad(5), 0, 0), 0.15) | |
1153 | rootj.C0 = clerp(rootj.C0, rootj0 * CFa(Rad(2), 0, 0), 0.15) | |
1154 | LS.C0 = clerp(LS.C0, LS0, 0.15) | |
1155 | RS.C0 = clerp(RS.C0, RS0, 0.15) | |
1156 | LH.C0 = clerp(LH.C0, LH0, 0.15) | |
1157 | RH.C0 = clerp(RH.C0, RH0, 0.15) | |
1158 | elseif state == "Walk" then | |
1159 | tw.C0 = clerp(tw.C0, tw0, 0.15) | |
1160 | tw.C1 = clerp(tw.C1, tw1, 0.15) | |
1161 | neck.C1 = clerp(neck.C1, neck1 * CFa(Rad(-5), 0, Rad(10 * Sin(sine / 8))), 0.15) | |
1162 | rootj.C1 = clerp(rootj.C1, rootj1 * CFn(0, 0, 0.1 * Cos(sine / 4)) * CFa(Rad(-5), 0, Rad(5 * Sin(sine / 8))), 0.15) | |
1163 | LS.C1 = clerp(LS.C1, LS1 * CFa(0, 0, Rad(-20 * Sin(sine / 8))), 0.15) | |
1164 | RS.C1 = clerp(RS.C1, RS1 * CFa(Rad(70), 0, 0), 0.15) | |
1165 | LH.C1 = clerp(LH.C1, LH1 * CFn(-0.15 * Cos(sine / 8), -0.3 * Cos(sine / 8), 0) * CFa(0, 0, Rad(55 * Sin(sine / 8))), 0.15) | |
1166 | RH.C1 = clerp(RH.C1, RH1 * CFn(-0.15 * Cos(sine / 8), 0.3 * Cos(sine / 8), 0) * CFa(0, 0, Rad(55 * Sin(sine / 8))), 0.15) | |
1167 | neck.C0 = clerp(neck.C0, neck0, 0.15) | |
1168 | rootj.C0 = clerp(rootj.C0, rootj0, 0.15) | |
1169 | LS.C0 = clerp(LS.C0, LS0, 0.15) | |
1170 | RS.C0 = clerp(RS.C0, RS0, 0.15) | |
1171 | LH.C0 = clerp(LH.C0, LH0 * CFa(0, 0, Rad(20)), 0.15) | |
1172 | RH.C0 = clerp(RH.C0, RH0 * CFa(0, 0, Rad(-20)), 0.15) | |
1173 | end | |
1174 | end |