SHOW:
|
|
- or go back to the newest paste.
1 | -- This script has been converted to FE by iPxter if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end local Player,Mouse,mouse,UserInputService,ContextActionService = owner do print("FE Compatibility code by Mokiros | Translated to FE by iPxter") script.Parent = Player.Character --RemoteEvent for communicating local Event = Instance.new("RemoteEvent") Event.Name = "UserInput_Event" --Fake event to make stuff like Mouse.KeyDown work local function fakeEvent() local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} t.connect = t.Connect return t end --Creating fake input objects with fake variables local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil end} --Merged 2 functions into one by checking amount of arguments CAS.UnbindAction = CAS.BindAction --This function will trigger the events that have been :Connect()'ed local function te(self,ev,...) local t = m[ev] if t and t._fakeEvent and t.Function then t.Function(...) end end m.TrigEvent = te UIS.TrigEvent = te Event.OnServerEvent:Connect(function(plr,io) if plr~=Player then return end if io.isMouse then m.Target = io.Target m.Hit = io.Hit else local b = io.UserInputState == Enum.UserInputState.Begin if io.UserInputType == Enum.UserInputType.MouseButton1 then return m:TrigEvent(b and "Button1Down" or "Button1Up") end for _,t in pairs(CAS.Actions) do for _,k in pairs(t.Keys) do if k==io.KeyCode then t.Function(t.Name,io.UserInputState,io) end end end m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) end end) Event.Parent = NLS([==[ local Player = game:GetService("Players").LocalPlayer local Event = script:WaitForChild("UserInput_Event") local UIS = game:GetService("UserInputService") local input = function(io,a) if a then return end --Since InputObject is a client-side instance, we create and pass table instead Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) end UIS.InputBegan:Connect(input) UIS.InputEnded:Connect(input) local Mouse = Player:GetMouse() local h,t --Give the server mouse data 30 times every second, but only if the values changed --If player is not moving their mouse, client won't fire events while wait(1/30) do if h~=Mouse.Hit or t~=Mouse.Target then h,t=Mouse.Hit,Mouse.Target Event:FireServer({isMouse=true,Target=t,Hit=h}) end end]==],Player.Character) Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS end | |
2 | - | pl = "noornabso" |
2 | + | |
3 | pl = "silver22352" | |
4 | Player = Game:GetService("Players").LocalPlayer | |
5 | Character = Player.Character | |
6 | RightArm = Character["Right Arm"] | |
7 | RightShoulder = Character.Torso["Right Shoulder"] | |
8 | LeftArm = Character["Left Arm"] | |
9 | Torso = Character["Torso"] | |
10 | LeftLeg = Character["Left Leg"] | |
11 | RightLeg = Character["Right Leg"] | |
12 | Head = Character["Head"] | |
13 | - | Workspace.SergeantSmokey.Head.face.Texture = "http://www.roblox.com/asset/?id=17058440" |
13 | + | |
14 | Workspace.silver22352.Head.face.Texture = "http://www.roblox.com/asset/?id=17058440" | |
15 | ||
16 | function CheckI(Item,Blacklist,Specific) | |
17 | for _,v in pairs(Item:children()) do | |
18 | if not Specific then | |
19 | if v:IsA(Blacklist) or v.Name:match(Blacklist) then | |
20 | v:Destroy() | |
21 | end | |
22 | else | |
23 | if v:IsA(Blacklist) or v.Name == Blacklist then | |
24 | v:Destroy() | |
25 | end | |
26 | end | |
27 | end | |
28 | end | |
29 | ||
30 | CheckI(Character,"Hat") | |
31 | ------------------------------------- | |
32 | ||
33 | Part13 = Instance.new("Part", Character) | |
34 | Part13.TopSurface = 0 | |
35 | Part13.BottomSurface = 0 | |
36 | Part13.Transparency = 0 | |
37 | Part13.FormFactor = "Custom" | |
38 | Part13.Size = Vector3.new(1, 1, 1) | |
39 | Part13.BrickColor = BrickColor.new("Really black") | |
40 | Part13.CanCollide = false | |
41 | Weld13 = Instance.new("Weld", Part13) | |
42 | Weld13.Part0 = Part13 | |
43 | Weld13.Part1 = Head | |
44 | Weld13.C0 = CFrame.new(0, -0.8, 0) | |
45 | SHMesh = Instance.new("SpecialMesh") | |
46 | SHMesh.Parent = Part13 | |
47 | SHMesh.Scale = Vector3.new(1, 1, 1) | |
48 | SHMesh.MeshId = "http://www.roblox.com/asset/?id=1028713" | |
49 | SHMesh.TextureId = "http://www.roblox.com/asset/?id=15726328" | |
50 | ||
51 | Part135 = Instance.new("Part", Character) | |
52 | Part135.TopSurface = 0 | |
53 | Part135.BottomSurface = 0 | |
54 | Part135.Transparency = 1 | |
55 | Part135.Reflectance = 0.8 | |
56 | Part135.FormFactor = "Custom" | |
57 | Part135.Size = Vector3.new(1, 1, 1) | |
58 | Part135.BrickColor = BrickColor.new("White") | |
59 | Part135.CanCollide = false | |
60 | Weld13 = Instance.new("Weld", Part135) | |
61 | Weld13.Part0 = Part135 | |
62 | Weld13.Part1 = Head | |
63 | Weld13.C0 = CFrame.new(0, -3, 0) | |
64 | SHMesh = Instance.new("SpecialMesh") | |
65 | SHMesh.Parent = Part135 | |
66 | SHMesh.MeshType = "Sphere" | |
67 | x = Instance.new("PointLight",Part135) | |
68 | x.Range = 20 | |
69 | x.Enabled = false | |
70 | ||
71 | ||
72 | Part = Instance.new("Part", Character) | |
73 | Part.TopSurface = 0 | |
74 | Part.BottomSurface = 0 | |
75 | Part.Transparency = 0 | |
76 | Part.FormFactor = "Custom" | |
77 | Part.Size = Vector3.new(1, 2, 1) | |
78 | Part.BrickColor = BrickColor.new("Really black") | |
79 | - | Workspace.SergeantSmokey["Right Leg"].Transparency = 1 |
79 | + | |
80 | Workspace.silver22352["Right Leg"].Transparency = 1 | |
81 | Weld = Instance.new("Weld", Part) | |
82 | Weld.Part0 = Part | |
83 | Weld.Part1 = RightLeg | |
84 | Weld.C0 = CFrame.new(0, 0, 0) | |
85 | ||
86 | Part2 = Instance.new("Part", Character) | |
87 | Part2.TopSurface = 0 | |
88 | Part2.BottomSurface = 0 | |
89 | Part2.Transparency = 0 | |
90 | Part2.FormFactor = "Custom" | |
91 | Part2.Size = Vector3.new(1, 2, 1) | |
92 | Part2.BrickColor = BrickColor.new("Really black") | |
93 | - | Workspace.SergeantSmokey["Left Leg"].Transparency = 1 |
93 | + | |
94 | Workspace.silver22352["Left Leg"].Transparency = 1 | |
95 | Weld2 = Instance.new("Weld", Part2) | |
96 | Weld2.Part0 = Part2 | |
97 | Weld2.Part1 = LeftLeg | |
98 | Weld2.C0 = CFrame.new(0, 0, 0) | |
99 | ||
100 | Part7 = Instance.new("Part", Character) | |
101 | Part7.TopSurface = 0 | |
102 | Part7.BottomSurface = 0 | |
103 | Part7.Transparency = 0 | |
104 | Part7.FormFactor = "Custom" | |
105 | Part7.Size = Vector3.new(1, 1.7, 1) | |
106 | Part7.BrickColor = BrickColor.new("White") | |
107 | - | Workspace.SergeantSmokey["Right Arm"].Transparency = 1 |
107 | + | |
108 | Workspace.silver22352["Right Arm"].Transparency = 1 | |
109 | Weld7 = Instance.new("Weld", Part7) | |
110 | Weld7.Part0 = Part7 | |
111 | Weld7.Part1 = RightArm | |
112 | Weld7.C0 = CFrame.new(0, 0.2, 0) | |
113 | ||
114 | Part45 = Instance.new("Part", Character) | |
115 | Part45.TopSurface = 0 | |
116 | Part45.BottomSurface = 0 | |
117 | Part45.Transparency = 0 | |
118 | Part45.FormFactor = "Custom" | |
119 | Part45.Size = Vector3.new(1.1, 1, 1.1) | |
120 | Part45.BrickColor = BrickColor.new("Really black") | |
121 | Part45.CanCollide = false | |
122 | Weld3 = Instance.new("Weld", Part45) | |
123 | Weld3.Part0 = Part45 | |
124 | Weld3.Part1 = RightArm | |
125 | Weld3.C0 = CFrame.new(0, -0.5, 0) | |
126 | ||
127 | Part8 = Instance.new("Part", Character) | |
128 | Part8.TopSurface = 0 | |
129 | Part8.BottomSurface = 0 | |
130 | Part8.Transparency = 0 | |
131 | Part8.FormFactor = "Custom" | |
132 | Part8.Size = Vector3.new(1, 1.7, 1) | |
133 | Part8.BrickColor = BrickColor.new("White") | |
134 | - | Workspace.SergeantSmokey["Left Arm"].Transparency = 1 |
134 | + | |
135 | Workspace.silver22352["Left Arm"].Transparency = 1 | |
136 | Weld8 = Instance.new("Weld", Part8) | |
137 | Weld8.Part0 = Part8 | |
138 | Weld8.Part1 = LeftArm | |
139 | Weld8.C0 = CFrame.new(0, 0.2, 0) | |
140 | ||
141 | Part45 = Instance.new("Part", Character) | |
142 | Part45.TopSurface = 0 | |
143 | Part45.BottomSurface = 0 | |
144 | Part45.Transparency = 0 | |
145 | Part45.FormFactor = "Custom" | |
146 | Part45.Size = Vector3.new(1.1, 1, 1.1) | |
147 | Part45.BrickColor = BrickColor.new("Really black") | |
148 | Part45.CanCollide = false | |
149 | Weld3 = Instance.new("Weld", Part45) | |
150 | Weld3.Part0 = Part45 | |
151 | Weld3.Part1 = LeftArm | |
152 | Weld3.C0 = CFrame.new(0, -0.5, 0) | |
153 | ||
154 | Part13 = Instance.new("Part", Character) | |
155 | Part13.TopSurface = 0 | |
156 | Part13.BottomSurface = 0 | |
157 | Part13.Transparency = 0 | |
158 | Part13.FormFactor = "Custom" | |
159 | Part13.Size = Vector3.new(2, 2, 1) | |
160 | Part13.BrickColor = BrickColor.new("Really black") | |
161 | - | Workspace.SergeantSmokey["Torso"].Transparency = 1 |
161 | + | |
162 | Workspace.silver22352["Torso"].Transparency = 1 | |
163 | Weld13 = Instance.new("Weld", Part13) | |
164 | Weld13.Part0 = Part13 | |
165 | Weld13.Part1 = Torso | |
166 | Weld13.C0 = CFrame.new(0, 0, 0) | |
167 | ||
168 | Part123 = Instance.new("Part", Character) | |
169 | Part123.TopSurface = 0 | |
170 | Part123.BottomSurface = 0 | |
171 | Part123.Transparency = 0 | |
172 | Part123.FormFactor = "Custom" | |
173 | Part123.Size = Vector3.new(1, 1, 1) | |
174 | Part123.BrickColor = BrickColor.new("White") | |
175 | Part123.CanCollide = false | |
176 | Weld13 = Instance.new("Weld", Part123) | |
177 | Weld13.Part0 = Part123 | |
178 | Weld13.Part1 = Torso | |
179 | Weld13.C0 = CFrame.new(0, 0.5, -0.8) | |
180 | SHMesh = Instance.new("SpecialMesh") | |
181 | SHMesh.Parent = Part123 | |
182 | SHMesh.Scale = Vector3.new(1.5, 1.5, 1.5) | |
183 | SHMesh.MeshId = "http://www.roblox.com/asset/?id=94820260" | |
184 | SHMesh.TextureId = "http://www.roblox.com/asset/?id=94820166" | |
185 | ||
186 | sg = Instance.new("ScreenGui") | |
187 | sg.Parent = game.Players[pl].PlayerGui | |
188 | button1 = Instance.new("TextButton") | |
189 | button1.Parent = sg | |
190 | button1.Text = "Light-On" | |
191 | button1.Position = UDim2.new(0,0,0.1,0) | |
192 | button1.Size = UDim2.new(0.1,0,0.1,0) | |
193 | button1.MouseButton1Click:connect(function() | |
194 | x.Enabled = true | |
195 | Part135.Transparency = 0 | |
196 | end) | |
197 | button2 = Instance.new("TextButton") | |
198 | button2.Parent = sg | |
199 | button2.Text = "Light-Off" | |
200 | button2.Position = UDim2.new(0,0,0.2,0) | |
201 | button2.Size = UDim2.new(0.1,0,0.1,0) | |
202 | button2.MouseButton1Click:connect(function() | |
203 | x.Enabled = false | |
204 | Part135.Transparency = 1 | |
205 | end) | |
206 | button3 = Instance.new("TextButton") | |
207 | button3.Parent = sg | |
208 | button3.Text = "Slow - 10" | |
209 | button3.Position = UDim2.new(0,0,0.3,0) | |
210 | button3.Size = UDim2.new(0.1,0,0.1,0) | |
211 | - | Workspace.SergeantSmokey.Humanoid.WalkSpeed = Workspace.SergeantSmokey.Humanoid.WalkSpeed - 10 |
211 | + | |
212 | Workspace.silver22352.Humanoid.WalkSpeed = Workspace.silver22352.Humanoid.WalkSpeed - 10 | |
213 | end) | |
214 | button4 = Instance.new("TextButton") | |
215 | button4.Parent = sg | |
216 | button4.Text = "Fast + 10" | |
217 | button4.Position = UDim2.new(0,0,0.4,0) | |
218 | button4.Size = UDim2.new(0.1,0,0.1,0) | |
219 | - | Workspace.SergeantSmokey.Humanoid.WalkSpeed = Workspace.SergeantSmokey.Humanoid.WalkSpeed + 10 |
219 | + | |
220 | Workspace.silver22352.Humanoid.WalkSpeed = Workspace.silver22352.Humanoid.WalkSpeed + 10 | |
221 | end) | |
222 | ||
223 | local h = Instance.new("HopperBin") | |
224 | h.Name = "Magic" | |
225 | local p = game.Players:findFirstChild(pl) | |
226 | if (p==nil) then return end | |
227 | h.Parent = p.Backpack | |
228 | ||
229 | - | Workspace.SergeantSmokey.Humanoid.WalkSpeed = 100 |
229 | + | |
230 | Workspace.silver22352.Humanoid.WalkSpeed = 100 | |
231 | end | |
232 | ||
233 | - | Workspace.SergeantSmokey.Humanoid.WalkSpeed = 20 |
233 | + | |
234 | Workspace.silver22352.Humanoid.WalkSpeed = 20 | |
235 | end | |
236 | ||
237 | ||
238 | ||
239 | function onKey(key, mouse) | |
240 | if key then | |
241 | local key = key:lower() | |
242 | if (key=="q") then | |
243 | fast1() | |
244 | if (key=="e") then | |
245 | fast2() | |
246 | end | |
247 | end | |
248 | end | |
249 | end | |
250 | h.Selected:connect(function(mouse) | |
251 | mouse.KeyDown:connect(function(key) onKey(key, mouse) end) | |
252 | end) | |
253 | ||
254 | --[[Soul Staff Made By malfact]]-- | |
255 | ||
256 | ||
257 | ||
258 | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
259 | local player = game.Players.LocalPlayer | |
260 | local character = player.Character | |
261 | ||
262 | if (player.Backpack:FindFirstChild("Soul Staff") ~= nil) then | |
263 | player.Backpack["Soul Staff"].Parent = nil | |
264 | end | |
265 | if (character:FindFirstChild("Soul_Staff") ~= nil) then | |
266 | character.Soul_Staff.Parent = nil | |
267 | end | |
268 | ||
269 | local RightShoulder = character.Torso["Right Shoulder"] | |
270 | local ShoulderWeld = nil | |
271 | local StaffWeld = nil | |
272 | ||
273 | local debounce = false | |
274 | local debounce2 = false | |
275 | ||
276 | local mode = "hurt" | |
277 | local orbWeld = {} | |
278 | local keys = {} | |
279 | ||
280 | local thrown = false | |
281 | local hold = false | |
282 | local holdTime = 0 | |
283 | ||
284 | local tool = Instance.new("HopperBin", player.Backpack) | |
285 | tool.Name = "Soul Staff" | |
286 | tool.Parent = player.Backpack | |
287 | local model = Instance.new("Model",character) | |
288 | model.Name = "Soul_Staff" | |
289 | ||
290 | function animateArm(boolean, c0, c1) | |
291 | if (boolean) then | |
292 | if (ShoulderWeld == nil) then | |
293 | ShoulderWeld = weld(character["Torso"],character["Right Arm"],CFrame.new()) | |
294 | end | |
295 | RightShoulder.Part0 = nil | |
296 | ||
297 | ShoulderWeld.C0 = c0 | |
298 | ShoulderWeld.C1 = c1 | |
299 | else | |
300 | RightShoulder.Part0 = character.Torso | |
301 | if (ShoulderWeld ~= nil) then | |
302 | ShoulderWeld.Parent = nil | |
303 | end | |
304 | ShoulderWeld = nil | |
305 | end | |
306 | end | |
307 | ||
308 | function animateStaff(boolean, c0, c1) | |
309 | if (boolean) then | |
310 | StaffWeld.Part0 = character["Right Arm"] | |
311 | StaffWeld.Part1 = model:FindFirstChild("Handle") | |
312 | StaffWeld.C0 = c0 | |
313 | StaffWeld.C1 = c1 | |
314 | else | |
315 | StaffWeld.Part0 = character["Torso"] | |
316 | StaffWeld.Part1 = model:FindFirstChild("Handle") | |
317 | StaffWeld.C0 = CFrame.new(0,0,0.5) | |
318 | StaffWeld.C1 = CFrame.new()*CFrame.Angles(0, 0, math.pi/4) | |
319 | end | |
320 | end | |
321 | ||
322 | function weld(p0, p1, cframe) | |
323 | local w = Instance.new("ManualWeld", p0) | |
324 | w.Part0 = p0 | |
325 | w.Part1 = p1 | |
326 | w.C0 = cframe | |
327 | return w | |
328 | end | |
329 | ||
330 | function newPart(size, color, parent) | |
331 | local part = Instance.new("Part") | |
332 | part.Locked = true | |
333 | part.FormFactor = 3 | |
334 | part.Size = size | |
335 | part.BrickColor = color | |
336 | part.BottomSurface = 0 | |
337 | part.TopSurface = 0 | |
338 | part.Anchored = false | |
339 | part.CanCollide = false | |
340 | part.Parent = parent | |
341 | return part | |
342 | end | |
343 | ||
344 | function newCylMesh(parent) | |
345 | local mesh = Instance.new("CylinderMesh", parent) | |
346 | return parent | |
347 | end | |
348 | ||
349 | function newSphereMesh(parent) | |
350 | local mesh = Instance.new("SpecialMesh",parent) | |
351 | mesh.MeshType = 3 | |
352 | return parent | |
353 | end | |
354 | ||
355 | function newIdMesh(id, size, parent) | |
356 | local mesh = Instance.new("SpecialMesh",parent) | |
357 | mesh.MeshType = 5 | |
358 | mesh.Scale = size | |
359 | mesh.MeshId = "http://www.roblox.com/Asset/?id="..id | |
360 | return parent | |
361 | end | |
362 | ||
363 | function addSoul(count) | |
364 | for i = 1, count do | |
365 | local p = newSphereMesh(newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)) | |
366 | orbWeld[#orbWeld + 1] = weld(model:FindFirstChild("core"),p,CFrame.new(0,0,0)) | |
367 | end | |
368 | end | |
369 | ||
370 | function removeSoul(count) | |
371 | for i = 1, count do | |
372 | orbWeld[#orbWeld].Part1.Parent = nil | |
373 | orbWeld[#orbWeld] = nil | |
374 | end | |
375 | end | |
376 | ||
377 | function getRadius(num) | |
378 | if (num < 16) then | |
379 | return 1 | |
380 | else | |
381 | return num/16 | |
382 | end | |
383 | end | |
384 | ||
385 | local handle = newCylMesh(newPart(Vector3.new(0.2,6,0.2),BrickColor.new(1,1,1),model)) | |
386 | handle.Name = "Handle" | |
387 | ||
388 | weld(handle,newSphereMesh(newPart(Vector3.new(0.4,0.4,0.4),BrickColor.new(0,0,0),model)),CFrame.new(0,3,0)) | |
389 | weld(handle,newCylMesh(newPart(Vector3.new(0.25,0.25,0.25),BrickColor.new(0,0,0),model)),CFrame.new(0,2.75,0)) | |
390 | weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,2.85,0)*CFrame.Angles(math.pi/2,0,0)) | |
391 | weld(handle,newIdMesh("3270017",Vector3.new(0.22,0.22,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,2.6,0)*CFrame.Angles(math.pi/2,0,0)) | |
392 | weld(handle,newSphereMesh(newPart(Vector3.new(0.4,0.4,0.4),BrickColor.new(0,0,0),model)),CFrame.new(0,-3,0)) | |
393 | weld(handle,newCylMesh(newPart(Vector3.new(0.25,0.25,0.25),BrickColor.new(0,0,0),model)),CFrame.new(0,-2.75,0)) | |
394 | weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,-2.85,0)*CFrame.Angles(math.pi/2,0,0)) | |
395 | weld(handle,newIdMesh("3270017",Vector3.new(0.22,0.22,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,-2.6,0)*CFrame.Angles(math.pi/2,0,0)) | |
396 | weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,0.5,0)*CFrame.Angles(math.pi/2,0,0)) | |
397 | weld(handle,newIdMesh("3270017",Vector3.new(0.25,0.25,0.5),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(1,1,1),model)),CFrame.new(0,-0.5,0)*CFrame.Angles(math.pi/2,0,0)) | |
398 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.4,0)*CFrame.Angles(math.pi/2,0,0)) | |
399 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.3,0)*CFrame.Angles(math.pi/2,0,0)) | |
400 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.2,0)*CFrame.Angles(math.pi/2,0,0)) | |
401 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,-0.1,0)*CFrame.Angles(math.pi/2,0,0)) | |
402 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.0,0)*CFrame.Angles(math.pi/2,0,0)) | |
403 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.1,0)*CFrame.Angles(math.pi/2,0,0)) | |
404 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.2,0)*CFrame.Angles(math.pi/2,0,0)) | |
405 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.3,0)*CFrame.Angles(math.pi/2,0,0)) | |
406 | weld(handle,newIdMesh("3270017",Vector3.new(0.21,0.21,1),newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model)),CFrame.new(0,0.4,0)*CFrame.Angles(math.pi/2,0,0)) | |
407 | ||
408 | local core = newPart(Vector3.new(0.2,0.2,0.2),BrickColor.new(0,0,0),model) | |
409 | core.Name = "core" | |
410 | core.Reflectance = 0.5 | |
411 | core.Transparency = 0.25 | |
412 | local coreWeld = weld(handle,newIdMesh("9756362",Vector3.new(0.5,0.5,0.5),core),CFrame.new(0,3.75,0)) | |
413 | Instance.new("PointLight",core) | |
414 | ||
415 | addSoul(8) | |
416 | ||
417 | StaffWeld = weld(character["Torso"],handle,CFrame.new()) | |
418 | animateArm(false, nil, nil) | |
419 | animateStaff(false, nil, nil) | |
420 | ||
421 | function damage(char) | |
422 | if (char == nil) then return end | |
423 | if (char:FindFirstChild("Humanoid") ~= nil) then | |
424 | if (not char.Humanoid:isA("Humanoid")) then | |
425 | char.Parent = nil | |
426 | return | |
427 | end | |
428 | local humanoid = char.Humanoid | |
429 | if (humanoid.Health > 0 and humanoid.Health - (#orbWeld+1) <= 0) then | |
430 | --addSoul(1) | |
431 | end | |
432 | if (char:FindFirstChild("Bubble") ~= nil) then | |
433 | coroutine.resume(coroutine.create(function() | |
434 | if (humanoid ~= nil) then | |
435 | humanoid.WalkSpeed = -16 | |
436 | end | |
437 | wait(5) | |
438 | if (humanoid ~= nil) then | |
439 | humanoid.WalkSpeed = 16 | |
440 | end | |
441 | end)) | |
442 | humanoid.PlatformStand = false | |
443 | char.Bubble.Parent = nil | |
444 | --addSoul(1) | |
445 | end | |
446 | humanoid.Health = humanoid.Health - (#orbWeld+1) | |
447 | end | |
448 | end | |
449 | ||
450 | function damageDistance(char, distance) | |
451 | if (char == nil) then return end | |
452 | if (char:FindFirstChild("Torso") ~= nil) then | |
453 | local torso = char.Torso | |
454 | if ((core.Position - torso.Position).magnitude <= distance) then | |
455 | damage(char) | |
456 | end | |
457 | end | |
458 | end | |
459 | ||
460 | function beam(start, position) | |
461 | coroutine.resume(coroutine.create(function() | |
462 | if (position == nil or start == nil) then return end | |
463 | local distance = (start-position).magnitude | |
464 | local p = newPart(Vector3.new(0.2,0.2,distance),BrickColor.new(0,0,0),model) | |
465 | p.Name = "beam012" | |
466 | p.Anchored = true | |
467 | p.Transparency = 0.25 | |
468 | p.CFrame = CFrame.new((start + position)/2,start) | |
469 | for i = 0, 0.75, 0.1 do | |
470 | p.Transparency = 0.25+i | |
471 | wait(0.01) | |
472 | end | |
473 | p.Parent = nil | |
474 | end)) | |
475 | end | |
476 | ||
477 | tool.Selected:connect(function(mouse) | |
478 | if (not throw) then | |
479 | animateArm(true, CFrame.new(1.5,0.5,0), CFrame.new(0,0.5,0)*CFrame.Angles(-math.pi/2, 0, 0)) | |
480 | animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new()) | |
481 | end | |
482 | ||
483 | mouse.Button1Down:connect(function() | |
484 | local hit = mouse.Hit | |
485 | if (debounce) then | |
486 | return | |
487 | end | |
488 | debounce = true | |
489 | if (mode == "hurt") then | |
490 | beam(core.Position, hit.p) | |
491 | if (mouse.Target ~= nil) then | |
492 | if (mouse.Target.Name == "box") then | |
493 | mouse.Target.Parent = nil | |
494 | else | |
495 | damage(mouse.Target.Parent) | |
496 | end | |
497 | end | |
498 | elseif (mode == "throw") then | |
499 | animateArm(false, nil, nil) | |
500 | StaffWeld.Part0 = nil | |
501 | if (handle:FindFirstChild("BodyPosition") ~= nil) then | |
502 | handle:FindFirstChild("BodyPosition").Parent = nil | |
503 | end | |
504 | if (handle:FindFirstChild("BodyGyro") ~= nil) then | |
505 | handle:FindFirstChild("BodyGyro").Parent = nil | |
506 | end | |
507 | local bp = Instance.new("BodyPosition",handle) | |
508 | bp.maxForce = Vector3.new(100000,100000,100000) | |
509 | bp.position = handle.Position + Vector3.new(0,30,0) | |
510 | local bg = Instance.new("BodyGyro",handle) | |
511 | bg.cframe = CFrame.new(bp.position,hit.p)*CFrame.Angles(math.pi/2,0,0) | |
512 | wait(1) | |
513 | bp.position = hit.p + Vector3.new(0,2,0) | |
514 | wait(0.3) | |
515 | bg.cframe = CFrame.new(bp.position,hit.p)*CFrame.Angles(math.pi/2,0,0) | |
516 | throw = true | |
517 | elseif (mode == "build") then | |
518 | beam(core.Position, hit.p) | |
519 | local p = newPart(Vector3.new(4,4,4),BrickColor.new(0,0,0),Workspace) | |
520 | p.Name = "box" | |
521 | p.Anchored = true | |
522 | p.CanCollide = true | |
523 | p.Transparency = 0.5 | |
524 | p.CFrame = hit*CFrame.Angles(math.random(0,math.pi*2),math.random(0,math.pi*2),math.random(0,math.pi*2)) | |
525 | Instance.new("PointLight",p) | |
526 | elseif (mode == "bubble") then | |
527 | beam(core.Position, hit.p) | |
528 | if (#orbWeld > 0) then | |
529 | if (mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil) then | |
530 | local humanoid = mouse.Target.Parent.Humanoid | |
531 | if (mouse.Target.Parent:FindFirstChild("Bubble") == nil) then | |
532 | if (mouse.Target.Parent:FindFirstChild("Torso") ~= nil) then | |
533 | local torso = mouse.Target.Parent.Torso | |
534 | local part = newPart(Vector3.new(8,8,8),BrickColor.new(0,0,0),mouse.Target.Parent) | |
535 | part.Name = "Bubble" | |
536 | part.Anchored = false | |
537 | part.CanCollide = true | |
538 | part.Shape = 0 | |
539 | part.Transparency = 0.5 | |
540 | part.CFrame = torso.CFrame | |
541 | Instance.new("PointLight",part) | |
542 | weld(torso,part,CFrame.new()) | |
543 | humanoid.PlatformStand = true | |
544 | -- removeSoul(1) | |
545 | end | |
546 | else | |
547 | coroutine.resume(coroutine.create(function() | |
548 | if (humanoid ~= nil) then | |
549 | humanoid.WalkSpeed = -50 | |
550 | end | |
551 | wait(5) | |
552 | if (humanoid ~= nil) then | |
553 | humanoid.WalkSpeed = 16 | |
554 | end | |
555 | end)) | |
556 | humanoid.PlatformStand = false | |
557 | mouse.Target.Parent.Bubble.Parent = nil | |
558 | --addSoul(1) | |
559 | end | |
560 | end | |
561 | end | |
562 | elseif (mode == "beam") then | |
563 | if (not hold and not throw) then | |
564 | animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi,0,0), CFrame.new()) | |
565 | hold = true | |
566 | holdTime = 0 | |
567 | end | |
568 | elseif (mode == "portal") then | |
569 | handle.Anchored = true | |
570 | local p = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model)) | |
571 | p.Anchored = true | |
572 | p.CFrame = CFrame.new(handle.Position) + Vector3.new(0,-2,0) | |
573 | local c = p.CFrame | |
574 | for i=1,15,0.5 do | |
575 | p.Size = p.Size+Vector3.new(0.5,0,0.5) | |
576 | p.CFrame = c | |
577 | wait(0.01) | |
578 | end | |
579 | local p1 = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model)) | |
580 | p1.Anchored = true | |
581 | p1.CFrame = CFrame.new(hit.p) | |
582 | p1.CFrame = CFrame.new(hit.p) | |
583 | local c1 = p1.CFrame | |
584 | handle.Anchored = false | |
585 | for i,v in ipairs(game.Workspace:getChildren()) do | |
586 | if (v:FindFirstChild("Torso") ~= nil) then | |
587 | if ((core.Position - v.Torso.Position).magnitude <= 8) then | |
588 | coroutine.resume(coroutine.create(function() | |
589 | v.Torso.CFrame = CFrame.new(Vector3.new(v.Torso.Position.x,p.Position.y+3,v.Torso.Position.z),v.Torso.CFrame.lookVector) | |
590 | v.Torso.Anchored = true | |
591 | for i=0, 10 do | |
592 | v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,-1,0) | |
593 | wait(0.1) | |
594 | end | |
595 | v.Torso.CFrame = CFrame.new(v.Torso.Position - (p.Position - p1.Position),v.Torso.CFrame.lookVector) + Vector3.new(0,4,0) | |
596 | for i=0, 10 do | |
597 | v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,1,0) | |
598 | wait(0.1) | |
599 | end | |
600 | v.Torso.Anchored = false | |
601 | end)) | |
602 | end | |
603 | end | |
604 | end | |
605 | for i=1,15,0.5 do | |
606 | p.Size = p.Size+Vector3.new(-0.5,0,-0.5) | |
607 | p1.Size = p1.Size+Vector3.new(0.5,0,0.5) | |
608 | p.CFrame = c | |
609 | p1.CFrame = c1 | |
610 | wait(0.01) | |
611 | end | |
612 | p.Parent = nil | |
613 | wait(1) | |
614 | for i=1,15,1 do | |
615 | p1.Size = p1.Size+Vector3.new(-1,0,-1) | |
616 | p1.CFrame = c1 | |
617 | wait(0.01) | |
618 | end | |
619 | p1.Parent = nil | |
620 | end | |
621 | debounce = false | |
622 | end) | |
623 | ||
624 | mouse.Button1Up:connect(function() | |
625 | if (debounce2) then | |
626 | return | |
627 | end | |
628 | debounce2 = true | |
629 | if (mode == "beam") then | |
630 | if (hold and holdTime >= 10) then | |
631 | if (#orbWeld > 0) then | |
632 | local p = newSphereMesh(newPart(Vector3.new(4,4,4),BrickColor.new(0,0,0),Workspace)) | |
633 | p.Name = "1" | |
634 | p.Transparency = 0.5 | |
635 | local point = core.CFrame*CFrame.Angles(math.pi/2, 0, 0) | |
636 | p.CFrame = CFrame.new(core.Position + point.lookVector*4,core.Position) | |
637 | Instance.new("PointLight",p) | |
638 | ||
639 | local bs = Instance.new("BodyVelocity",p) | |
640 | bs.velocity = point.lookVector*(2*holdTime)+Vector3.new(0,0.25,0) | |
641 | bs.maxForce = Vector3.new(100000,100000,100000) | |
642 | ||
643 | p.Touched:connect(function(part) | |
644 | if (part.Name ~= "beam012") then | |
645 | if (p.Name == "3") then | |
646 | p.Parent = nil | |
647 | elseif (p.Name == "2") then | |
648 | p.Name = "3" | |
649 | elseif (p.Name == "1") then | |
650 | p.Name = "2" | |
651 | end | |
652 | part.Parent = nil | |
653 | end | |
654 | end) | |
655 | ||
656 | coroutine.resume(coroutine.create(function() | |
657 | for i = 1, 5, 0.01 do | |
658 | if (p.Parent ~= nil) then | |
659 | beam(p.Position, p.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))) | |
660 | end | |
661 | wait(0.01) | |
662 | end | |
663 | p.Parent = nil | |
664 | end)) | |
665 | ||
666 | wait(1) | |
667 | --removeSoul(2) | |
668 | end | |
669 | end | |
670 | hold = false | |
671 | holdTime = 0 | |
672 | animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new()) | |
673 | end | |
674 | debounce2 = false | |
675 | end) | |
676 | ||
677 | mouse.KeyDown:connect(function (key) | |
678 | keys[key] = true | |
679 | if (keys["z"]) then | |
680 | mode = "hurt" | |
681 | elseif (keys["x"]) then | |
682 | mode = "bubble" | |
683 | elseif (keys["q"]) then | |
684 | mode = "beam" | |
685 | elseif (keys["c"]) then | |
686 | mode = "drain" | |
687 | elseif (keys["v"]) then | |
688 | mode = "build" | |
689 | elseif (keys["e"]) then | |
690 | if (mode ~= "throw") then | |
691 | mode = "throw" | |
692 | else | |
693 | if (debounce) then return end | |
694 | debounce = true | |
695 | if (throw) then | |
696 | handle:FindFirstChild("BodyPosition").Parent = nil | |
697 | handle:FindFirstChild("BodyGyro").Parent = nil | |
698 | throw = false | |
699 | animateArm(true, CFrame.new(1.5,0.5,0), CFrame.new(0,0.5,0)*CFrame.Angles(-math.pi/2, 0, 0)) | |
700 | animateStaff(true, CFrame.new(0,-1,0)*CFrame.Angles(math.pi + math.pi/2,0,0), CFrame.new()) | |
701 | end | |
702 | debounce = false | |
703 | end | |
704 | elseif (keys["b"]) then | |
705 | if (debounce) then return end | |
706 | debounce = true | |
707 | if (throw) then | |
708 | local p = newCylMesh(newPart(Vector3.new(1,0.25,1),BrickColor.new(0,0,0),model)) | |
709 | p.Anchored = true | |
710 | p.CFrame = CFrame.new(handle.Position) + Vector3.new(0,-2,0) | |
711 | local c = p.CFrame | |
712 | for i=1,30,0.5 do | |
713 | p.Size = p.Size+Vector3.new(0.5,0,0.5) | |
714 | p.CFrame = c | |
715 | wait(0.01) | |
716 | end | |
717 | for i,v in ipairs(game.Workspace:getChildren()) do | |
718 | if (v:FindFirstChild("Torso") ~= nil) then | |
719 | if ((core.Position - v.Torso.Position).magnitude <= 15) then | |
720 | coroutine.resume(coroutine.create(function() | |
721 | v.Torso.CFrame = CFrame.new(Vector3.new(v.Torso.Position.x,p.Position.y+3,v.Torso.Position.z),v.Torso.CFrame.lookVector) | |
722 | v.Torso.Anchored = true | |
723 | for i=0, 10 do | |
724 | v.Torso.CFrame = v.Torso.CFrame+Vector3.new(0,-1,0) | |
725 | wait(0.1) | |
726 | end | |
727 | v:BreakJoints() | |
728 | end)) | |
729 | end | |
730 | end | |
731 | end | |
732 | for i=1,30,1 do | |
733 | p.Size = p.Size+Vector3.new(-1,0,-1) | |
734 | p.CFrame = c | |
735 | wait(0.01) | |
736 | end | |
737 | p.Parent = nil | |
738 | end | |
739 | debounce = false | |
740 | elseif (keys["f"]) then | |
741 | mode = "portal" | |
742 | end | |
743 | end) | |
744 | mouse.KeyUp:connect(function (key) keys[key] = false end) | |
745 | end) | |
746 | ||
747 | tool.Deselected:connect(function() | |
748 | hold = false | |
749 | holdTime = 0 | |
750 | if (not throw) then | |
751 | animateArm(false, nil, nil) | |
752 | animateStaff(false, nil, nil) | |
753 | end | |
754 | end) | |
755 | ||
756 | local y = 0 | |
757 | local x = 0 | |
758 | game:getService("RunService").Stepped:connect(function() | |
759 | if (hold) then | |
760 | holdTime = holdTime+0.5 | |
761 | if(holdTime >= 10) then | |
762 | beam(core.Position, core.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))) | |
763 | end | |
764 | end | |
765 | ||
766 | if (mode == "drain") then | |
767 | for q,v in pairs(Workspace:getChildren()) do | |
768 | if (v ~= character and math.random(1,10) == 1) then | |
769 | damageDistance(v, 10) | |
770 | end | |
771 | end | |
772 | beam(core.Position, core.Position+Vector3.new(math.random(-5,5),math.random(-5,5),math.random(-5,5))) | |
773 | end | |
774 | ||
775 | coreWeld.C0 = CFrame.new(0,3.75,0)+Vector3.new(0,math.sin(y)/4,0) | |
776 | ||
777 | for i,v in ipairs(orbWeld) do | |
778 | local radius = getRadius(#orbWeld) | |
779 | ||
780 | local index = x + ((math.pi*2)/#orbWeld)*(i-1) | |
781 | ||
782 | orbWeld[i].C0 = CFrame.new(radius*math.sin(index), 0, radius*math.cos(index)) | |
783 | end | |
784 | ||
785 | if (y < math.pi*2) then | |
786 | y = y + math.pi*2/128 | |
787 | else | |
788 | y = math.pi*2/128 | |
789 | end | |
790 | ||
791 | if (x < math.pi*2) then | |
792 | x = x + math.pi*2/128 | |
793 | else | |
794 | x = math.pi*2/128 | |
795 | end | |
796 | end) |