Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted by N3xul.
- -- _ _ ____ _ _____ _ _
- -- | \ | |___ \ | | / ____| (_) | |
- -- | \| | __) |_ ___ _| | | (___ ___ _ __ _ _ __ | |_
- -- | . ` ||__ <\ \/ / | | | | \___ \ / __| '__| | '_ \| __|
- -- | |\ |___) |> <| |_| | | ____) | (__| | | | |_) | |_
- -- |_| \_|____//_/\_\\__,_|_| |_____/ \___|_| |_| .__/ \__|
- -- | |
- -- |_|
- local runDummyScript = function(f,scri)
- local oldenv = getfenv(f)
- local newenv = setmetatable({}, {
- __index = function(_, k)
- if k:lower() == 'script' then
- return scri
- else
- return oldenv[k]
- end
- end
- })
- setfenv(f, newenv)
- ypcall(function() f() end)
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- mas.Name = "CompiledModel"
- o1 = Instance.new("Tool")
- o2 = Instance.new("Part")
- o3 = Instance.new("SpecialMesh")
- o5 = Instance.new("Attachment")
- o6 = Instance.new("Script")
- o7 = Instance.new("LocalScript")
- o1.Name = "RedFidgetSpinner"
- o1.Parent = mas
- o1.TextureId = "rbxassetid://915250372"
- o1.GripForward = Vector3.new(-0, 1, -0)
- o1.GripUp = Vector3.new(0, 0, 1)
- o2.Name = "Handle"
- o2.Parent = o1
- o2.Position = Vector3.new(41.1632881, 0.100239001, 57.1540794)
- o2.Rotation = Vector3.new(89.9700012, -0.0299999993, 36.9099998)
- o2.Size = Vector3.new(0.5, 0.5, 0.199999988)
- o2.CFrame = CFrame.new(41.1632881, 0.100239001, 57.1540794, 0.799575806, -0.600564897, -0.000564188871, -0.000188550242, 0.000688399363, -0.999999762, 0.600565135, 0.799575686, 0.000437190814)
- o2.Position = Vector3.new(41.1632881, 0.100239001, 57.1540794)
- o2.Orientation = Vector3.new(89.9599991, -52.2299995, -15.3199997)
- o3.Parent = o2
- o3.MeshId = "rbxassetid://915251142"
- o3.Offset = Vector3.new(-0.00999999978, 0.140000001, 0)
- o3.Scale = Vector3.new(0.150000006, 0.150000006, 0.150000006)
- o3.TextureId = "rbxassetid://915250833"
- o3.MeshType = Enum.MeshType.FileMesh
- o3.Scale = Vector3.new(0.150000006, 0.150000006, 0.150000006)
- o5.Name = "RightGripAttachment"
- o5.Parent = o2
- o5.Rotation = Vector3.new(90, 3.61587208e-28, -0)
- o5.CFrame = CFrame.new(0, 0, 0, 1, 0, 6.31088724e-30, 6.31088724e-30, 0, -1, 0, 1, 0)
- o5.Axis = Vector3.new(1, 6.31088724e-30, 0)
- o5.Orientation = Vector3.new(90, 0, 0)
- o6.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local Tool = script.Parent
- local Handle = Tool.Handle
- if not Handle then return end
- local Character = nil
- local RightHand = nil
- local SpinningConn = nil
- local SPIN_SPEED = 1500
- local SLOW_DOWN_RATE = 50
- local CurrentSpeed = 0
- function Spin()
- local RightGrip = RightHand:FindFirstChild("RightGrip")
- if RightGrip then
- CurrentSpeed = math.min(CurrentSpeed + SPIN_SPEED, 4000)
- if SpinningConn then return end
- SpinningConn = RunService.Heartbeat:Connect(function(delta)
- RightGrip.C1 = RightGrip.C1 * CFrame.Angles(0, math.rad(-1) * delta * CurrentSpeed, 0)
- CurrentSpeed = math.max(0, CurrentSpeed - (SLOW_DOWN_RATE * delta))
- if CurrentSpeed <= 0 then
- SpinningConn:Disconnect()
- SpinningConn = nil
- end
- end)
- end
- end
- function OnActivated()
- if not Tool.Enabled then return end
- Tool.Enabled = false
- Spin()
- wait(1)
- Tool.Enabled = true
- end
- function OnEquipped()
- Character = Tool.Parent
- RightHand = Character:FindFirstChild("Right Arm") or Character:FindFirstChild("RightHand")
- end
- function OnUnequipped()
- if SpinningConn then
- SpinningConn:Disconnect()
- SpinningConn = nil
- end
- Character = nil
- RightHand = nil
- CurrentSpeed = 0
- end
- Tool.Equipped:Connect(OnEquipped)
- Tool.Unequipped:Connect(OnUnequipped)
- Tool.Activated:Connect(OnActivated)
- end,o6)
- end))
- o7.Name = "MouseIcon"
- o7.Parent = o1
- table.insert(cors,coroutine.create(function()
- wait()
- runDummyScript(function()
- Mouse_Icon = "rbxasset://textures/GunCursor.png"
- Reloading_Icon = "rbxasset://textures/GunWaitCursor.png"
- Tool = script.Parent
- Mouse = nil
- function UpdateIcon()
- if Mouse then
- Mouse.Icon = Tool.Enabled and Mouse_Icon or Reloading_Icon
- end
- end
- function OnEquipped(ToolMouse)
- Mouse = ToolMouse
- UpdateIcon()
- end
- Tool:GetPropertyChangedSignal("Enabled"):Connect(UpdateIcon)
- Tool.Equipped:connect(OnEquipped)
- end,o7)
- end))
- mas.Parent = workspace
- mas:MakeJoints()
- local mas1 = mas:GetChildren()
- for i=1,#mas1 do
- mas1[i].Parent = game:GetService("Players").LocalPlayer.Backpack
- ypcall(function() mas1[i]:MakeJoints() end)
- end
- mas:Destroy()
- for i=1,#cors do
- coroutine.resume(cors[i])
- end
Add Comment
Please, Sign In to add comment